Sam Healey
Sam Healey

Reputation: 676

How to create a field on a node in drupal?

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

Upvotes: 0

Views: 131

Answers (2)

Anthony Leach
Anthony Leach

Reputation: 1993

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

Upvotes: 0

messedup
messedup

Reputation: 1108

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.

Upvotes: 1

Related Questions