i want to add few html elements call first name and last name,company name in top of user/register page and save that data when user click create account button..,how can i achieve that,i add html elements in block as normal html tags like but dont't kow how to get data...thanks
Does it have to be in a block? If you want to add fields to the registration form and do something with the values when they submit, you really have to add them to the registration form itself, not in a block somewhere nearby. To do this you can create a custom module that implements a form alter. For example:
Now having said all that, is there some reason you want to do this custom? It is possible to use a module that lets you add fields to the register form, like the profile2 module. That module lets you add profiles (essentially a group of fields, similar to a node) to users, which can also be displayed on the registration form for the user to fill out at that point. The module handles saving the data for you, along with a lot of other features, like views support. |
|||
|
Just go to the people category on your configuration page , click on account settings and select the the manage fields tab, and create your new fields. You don't need html elements to do that |
|||
|