0
votes

Im using drupal and just want to create a field on a node for users to submit a number.

Ive created a module. Through the install file ive created a table in mysql and added uid, nid, and amount columns.

Now I just want a field on the node page, node/%. Not on the node/%/edit pages.

So users viewing the node can specify the value then the nid, uid and amount will be sent.

Ive tried hook form alter and hook node api. But all the tutorials i can find are for changing field values, or adding fields to the edit page.

Thanks for any help or any starting points

2
just to confirm, Aren't you using cck module to create field for a specific node type. - Vikas Naranje
hi vikas. I am, but not in this case as I want the input for the field on the actual node, not on the edit page. Similar to voting or flagging, but an actual field to specify a value. - Sam Healey

2 Answers

1
votes

This sounds like you would be best to look at the voting_api module or user_points modules. If those use cases don't fit your needs, they would be a starting point to see how to do what you want.

0
votes

I cam across this post this morning and seems this might also give you a little help with attaching a form to a node content page. Working with forms in Drupal 7