We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36926
    • 701 Posts
    Hi Anyone have an idea how when a user register they are able to choose via say a dropdown menu what web user group they join. So i basically need the $groups value to be influenced by the users choice.

    Thanks

    Ben
      • 4310
      • 2,310 Posts
      I’m just starting a project that needs the same feature.
      If you can wait a short while I should be able to share whatever code is needed. smiley
        • 36926
        • 701 Posts
        Hi Bunk58,
        That would be great if you could keep me posted. I’m still trying ways to see if i can achieve this so if i do have any success i will also let you know.

        I don’t suppose your project involves uploading multiple images to use with webloginpe, as that another thing i’ve posted what i’m stuck on.
        http://modxcms.com/forums/index.php/topic,31160.msg188956.html#msg188956

        Many Thanks

        Ben
          • 36926
          • 701 Posts
          Hi Bunk58,

          I’ve been trying out a couple of things with regards the end user controlling what groups they join. I’ve had some success, now not sure if it’s the correct way of doing it but seems to do the trick.

          First i set up a TV called setgroup with a defualt value of:
          @EVAL return $_POST["setgroupnum"];


          Then i set up a register template with the normal fields but also added a drop down for the different groups the user can join:
          <select name="setgroupnum">
          <option selected="selected">Group to join</option>
          <option value="group1">join group 1</option>
          <option value="group2">join group 2</option>
          </select>

          At first i had this within it’s it’s own form tag as thought may need to submit this first to assign the groups value before trying to register the user. This didn’t seem to work so I placed all the register fields and the group dropdown within the single form tag.

          Finally i had a weblogin call on the register page:
          [!WebLoginPE? &type=`register` &registerTpl=`regtpl2` &groups=`[*setgroup*]` &regSuccessId=`14` !]

          Let me know what you think, this seems to work. I’ve tested in FF and safari both on mac.

          I’ve also managed to applied a similar technique to allow the user list to be filter.

          Thanks

          Ben
            • 25551 ☆ A M B ☆
            • 1,231 Posts
            I asked about this a while back... I never started work on it as it seemed a little hard for me but I’ll be keeping an eye on this idea!
              Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
              AugmentBLU - MODX Partner

              BLUcart - MODX Revolution E-Commerce & Shopping Cart
              • 16702 ☆ A M B ☆
              • 536 Posts
              Quote from: bennyb at Dec 13, 2008, 07:55 PM

              Hi Bunk58,

              I’ve been trying out a couple of things with regards the end user controlling what groups they join. I’ve had some success, now not sure if it’s the correct way of doing it but seems to do the trick.

              First i set up a TV called setgroup with a defualt value of:
              @EVAL return $_POST["setgroupnum"];


              Then i set up a register template with the normal fields but also added a drop down for the different groups the user can join:
              <select name="setgroupnum">
              <option selected="selected">Group to join</option>
              <option value="group1">join group 1</option>
              <option value="group2">join group 2</option>
              </select>

              At first i had this within it’s it’s own form tag as thought may need to submit this first to assign the groups value before trying to register the user. This didn’t seem to work so I placed all the register fields and the group dropdown within the single form tag.

              Finally i had a weblogin call on the register page:
              [!WebLoginPE? &type=`register` &registerTpl=`regtpl2` &groups=`[*setgroup*]` &regSuccessId=`14` !]

              Let me know what you think, this seems to work. I’ve tested in FF and safari both on mac.

              I’ve also managed to applied a similar technique to allow the user list to be filter.

              Thanks

              Ben

              is this work? i test a few times and no results?!
              can u post another resolution for same problem?

              Thanks
                palma non sine pulvere