
Multi-Step Registration
=======================

Description
-----------

With Multi-Step Registration you can create multi-step (wizard) user account
registration forms. Each step of the wizard can be configured to, optionally,
expose one ore more Profile2 types.

Dependencies
------------

 - Chaos tool suite (ctools): https://drupal.org/project/ctools

Integration
-----------

1. Profile2: https://drupal.org/project/profile2

   Multi-Step Registration is able to place forms generated by Profile2 types
   into wizard steps. By using Multi-Step Registration in conjunction with
   Profile2 you can create rich registration wizards.

2. Internationalization (i18n) module: https://drupal.org/project/i18n

   If "Variable translation" (i18n_variable) module is enabled, next user
   defined variables can be translated:
   - step_title_[step]: The wizard step title.
   - step_description_[step]: The wizard step description.
   - step_button_next: The 'Next' button label.
   - step_button_back: The 'Back' button label.
   - step_button_finish: The 'Finish' button label.

Install
-------

Install the module as any other module, following the manual instructions at
https://drupal.org/documentation/install/modules-themes/modules-7
Important: Use PHP 5.3 or above.

Configuration
-------------

 1. Configure user account registration wizard steps and general settings at
    admin/config/people/step. There's a pre-configured 'register' step,
    corresponding to the screen where user is adding his username and E-mail.
    That cannot be deleted but you can still change the name and description.
    You can configure also other values there, for example if the wizard trails
    will be shown, the redirection after finishing the wizard, etc. Use the drag
    and drop feature to order the wizard steps for your needs.
 2. [Optional] Now it's time to place Profile2 types on your wizard steps. To do
    so, visit Profile2 types page at admin/structure/profiles and edit the
    Profile2 types that you ant to add in the registration flow. On each
    profile, under "Show in user registration, in step", select the wizard step
    on which this profile form will be exposed. You're able to exclude optional
    fields from the registration process.

You're done!

Extending
---------

Using this module you can create wizard steps that does not contain any Profile2
forms. To inject new custom form elements in a wizard step (with or without
profile), you'll need only to use the standard Drupal form alteration mechanism.

 - hook_form_step_step_alter() alters all steps in the wizard -- except the
   first one, for that implement step_form_user_register_form_alter().

   OR

 - hook_form_step_STEP_ID_alter() will alter only a specific step.

In case you add your additional form elements, you're responsible to implement
validation and submit callbacks. Just make sure you add your callbacks without
overriding those already implemented.

Use:

 - $form['#validate'][] = 'my_validation_callback';

   OR

 - $form['#submit'][] = 'my_submit_callback';

in your form alter hook implementation.

Author
------

Claudiu Cristea (claudiu.cristea):

 - E-mail: claudiu.cristea@webikon.com
 - Twitter: http://twitter.com/claudiu_cristea
