Custom registration form with different registration process based on what’s selected

I’m trying to make a registration form with a registration process like the following. Can it be done?

These are the fields for the registration form.

Read More
Username
Email Address
First Name
Last Name
Contact Tel No
Company Name
Address (room for 3 lines of text)
Postcode
Industry (drop down list)
Product Interests (tick box / multi choice)
Status (drop down list: End User, Reseller/Partner, Distributor, Other). If other selected then 'Other' free type box appears.
data consent tick box (a tick box which is default to being 'ticked' should show 'Opt-in to receive relevant information concerning products and services')
anti-spam widget (to avoid robots trawling the site can we add an anti-spam verification box for submissions)

All fields are mandatory *


If the user selects `’Reseller/Partner’` then the process is as follows:

Confirmation message on screen:

“Thank you for registering to become a Partner. This request requires authorisation and you will be notified shortly when the autorisation is complete.”

  • User receives confirmation email with text similar to above
  • Site staff (custom/any role – pre-defined) receives email containing the users information and requesting that they authorise the user from a system staff (custom/any role – pre-defined)
  • Site staff (custom/any role – pre-defined) authorises the Partner username
  • User receives confirmation email to say “Congratulation! You have now been approved for Partner access to www.example.com/partners.”
  • User can now login and the system automatically redirects to the Partners page

If the user selects any status *other than ‘Reseller/Partner’*, the process is as follows:

  • Confirmation message on screen – “Thank you for registering. You will know be directed to the My Printer page.
  • User is directed to the My Printer page
  • User receives confirmation similar to text above
  • Site staff (custom/any role – pre-defined) received email containing the user information

Can this sort of thing be done?

Thanks

Related posts

Leave a Reply

3 comments

  1. For something like this, I would look to the Gravity Forms plugin. http://gravityforms.com

    It allows you to have conditional logic, where a field only shows up if a certain field is selected. For this situation, I would make different gravity forms that only display if a checkbox is marked (reseller/partner…and so on). This way you can have different fields for each section and each form can send a different confirmation email. It’s also possible to filter the output email from Gravity Forms based on certain conditions with hooks. Same is true with the confirmation messages, you can add html to adjust the message to your needs.

  2. Ended up not doing this. As mentioned in the other answer Gravity forms may have worked but not sure as i’ve never used it. I just left the registration as it was and manually change peoples roles.

  3. I was also trying to work on same stuff,finally after lots of effort i got solution.

    Used plugin: http://wordpress.org/plugins/wp-roles-at-registration/

    Add these lines to your function.php

    add_role('user', 'User', array(
    'read' => false, // True allows that capability
    'edit_posts' => false,
    'delete_posts' => false, // Use false to explicitly deny
    ));
    
    remove_role( 'company' ); 
    add_role('company', 'Company', array(
    'read' => true, // True allows that capability
    'edit_profile' => true,
    'delete_posts' => false, // Use false to explicitly deny
    ));
    

    On my end everything working fine.