We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14162
    • 67 Posts
    Login is an excellent component, but I need a little help. I have a registration form set up and I’d like the registrants to be able to select a User Group from a list - rather than defining the user group(s) in the snippet parameters. e.g:

    [[!Register?
        &submitVar=`registerbtn`
        &activationResourceId=`32`
        &activationEmailTpl=`lgnActivateEmailTpl`
        &activationEmailSubject=`Thanks for Registering!`
        &submittedResourceId=`2`
    &usergroups=`somethingheretopickupwhattheregistranthaschosen`
    ]]
    <form...>
    <select name="usergroups"><option value="group1">... etc.
    


    I’ve tried preHooks but not sure if that’s relevant. Any help, much appreciated.
      • 23034
      • 10 Posts
      Hey jimbob72,
      I have exactly the same "problem". Did you find an solution?

      Would be glad to hear from you (or anybody else who’s giving a approach to this problem).

        • 14162
        • 67 Posts
        hey perfectcircle

        I didn’t find a solution, but I did find a workaround for my site. I now have a pre-registration page where the user selects their user group and I pass the resulting value to the registration form using a URL querystring:
        <div class="register">
        <p>Please select your profile:</p><br/>
        <p><a href="register/registration?role[]=Private">Private investor</a></p>
        <p><a href="register/registration?role[]=Professional">Professional investor</a></p>
        <p><a href="register/registration?role[]=IFA">IFA</a></p>
        <p><a href="register/registration?role[]=Manager">Fund manager</a></p>
        </div>

        Then I pick up the value in the form using a simple parsing snippet.
          • 32360
          • 16 Posts
          Use a posthook, and assign the user to the selected usergroup/s that way.

          Let me know if you need more help.
            [url=http://www.williamastrom.se]Webdesign and CMS developer William