learner
learner

Reputation: 1155

Drupal: How to add a form and perform functionality on it

I am new to Drupal and trying to get hand on it.

I am not able to find how to have the following functionality on my site. If anyone can help me out, it would be great for me.

I need to have a form that will take 2 fields one of which is supposed to be the login id(how to retrive login id?). I need to store this and display in tabular form also on a new page. Lastly I want to provide an edit form for this functionality using the same form but its use will be like whenever a person adds value in this form, it checks in Table1, if entry is not present it adds in table, else it updates the table. Apart from this I need to store all the updations in a seperate table or something like that, so that I am able to see the history of all the changes

Eg:

ADD Form:
Fields:
- LoginID
- Phone number

Show Table Page(Tabular with the stored information)

Edit Form(same as above form):
Fields:
- LoginID
- Phone number

Now If I add my phone number to this it will get stored. Later when I try to modify my number it should update in initial table but also store the history of old and new entry in a separate table so that I can perform varies options on it.

I also dont know how to add/enable form fields in drupal. :(

Thanks

Upvotes: 0

Views: 81

Answers (1)

Ryan A.
Ryan A.

Reputation: 437

I'm not entirely sure what you're asking, but I think the Computed Field module might be helpful. The module allows you to define custom hooks that run when a node is saved.

If you're not creating nodes and are using something like the Webform module, you should be able to write a module to process the data.

Upvotes: 1

Related Questions