1

I have a site built using Drupal 7. The site has a registration form now. There is a new requirement to add a couple of new fields in the registration form and put it in a new page.

http://example.com/register is the existing registration form and user submitting this form will be registered. http://example.com/newpage is a new page with some content and registration form with two extra fields. When users submit this page, a new user account will be created along with saving the new fields to the user profile.

How can I implement this?

  • 1
    You can add fields to the user account itself by going to admin/config/people/accounts/fields or you can also use Profile2 module. – wolverine Jul 3 '14 at 12:59
0

For this you can use either of the ways 1) You can create a new form in your Custom module as a block with all the mandatory and extra fields you required. Now assign this block to the page where you want to assign this.

2) Secondly alter the register form block in your theme's template.php or in custom module. You need to alter its submit function too so it will submit your extra values too.

Let me know for any more help.

0

Use the LoginToboggan module

The LoginToboggan module offers several modifications of the Drupal login system in an external module by offering the following features and usability improvements:

  1. Allow users to login using either their username OR their e-mail address.
  2. Allow users to login immediately.
  3. Provide a login form on Access Denied pages for non-logged-in (anonymous) users.
  4. The module provides two login block options: One uses JavaScript to display the form within the block immediately upon clicking "log in". The other brings the user to a separate page, but returns the user to their original page upon login.
  5. Customize the registration form with two e-mail fields to ensure accuracy.
  6. Optionally redirect the user to a specific page when using the 'immediate login' feature.
  7. Optionally redirect the user to a specific page upon validation of their e-mail address.
  8. Optionally display a user message indicating a successful login.
  9. Optionally combine both the login and registration form on one page.
  10. Optionally have unvalidated users purged from the system at a pre-defined interval (please read the CAVEATS section of INSTALL.txt for important information on configuring this feature!).
  11. Integrates with Rules module to do various tasks when a user validates via email validation process (see http://drupal.org/node/880904 for an example)

Demo is here http://doaproject.org/user/register

  • 1
    Logintoboggan does not provide to create registration path. Instead it provides different login options to user(Login by email or username). We have Profile2 module that provide us to create multiple registeration paths. But registration path format will be "test1/register" or "test2/register". – TBI Infotech Jul 4 '14 at 6:16
0

for this you can use user-register.tpl.php. use hook_theme function to register user-register tpl in template.php file of your theme. then using theme hook suggestions find the template of you new page. create that template and render user_register form in that new tpl file ....

  • 1
    I don't think this should be solved in the theme layer. I think is better to use other Drupal subsystems, for example Form API. – sanzante Aug 1 '14 at 12:40
0

The base user form can be extended with fields. See admin/config/people/accounts/fields

Configuration > People > Account settings > Manage fields

Adding more complicated registration forms and mapping them to different pages is what the profile2 module does.

I've got a site with 'studios' and 'affiliates'. Install profile2. Then see admin/structure/profiles

Admin > Structure > Profile types

If I edit the profile type for 'studio' it has Unique registration path set and the path mapped to /studio/register. Affiliate has a different path and a different form.

A fully functional form builder is provided under 'manage fields'.

This site does also use 'login toboggan' to get people to fill out 'basic information' then redirect them to some content nodes once they are first registered.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.