We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11186
    • 38 Posts
    The solution I use to get around this on the register page:

    Create a custom snippet named 'setExtReg'.

    /* grab the profile */
    $profile = $hook->getValue('register.profile');
    $extended = $profile->get('extended');
    /* grab the value of the select or checkbox input on the register page */
    $checkbox = $hook->getValue('checkboxname');
    /* place it in the container hierarchy I want and save */
    $extended['containername'][checkboxname] = $checkbox;
    $profile->set('extended', $extended);
    $profile->save();
    return true;


    Then list the checkbox or selects in the &excludeExtended param and run the snippet as a post hook. This should work with the updateprofile snippet as well with a couple changes to the profile get. Hope this helps someone.
      • 36524
      • 8 Posts
      I will have to give this a shot once I get the chance. Looks like this may work.

      I am a bit concerned though that I am not using this on a registration page. It is just being used like a store situation. In which you have to have an account and be logged in to get to. I am assuming that the registration hook could be just placed for this page as well. But i will know more once I get the chance to test this.


      Thank you all for your help.
        • 18373 ☆ A M B ☆
        • 3,141 Posts
        Looks like a syntax error on line 7 there, grabenfub:
        $extended['containername'][checkboxname] = $checkbox;

        should probably be
        $extended['containername']['checkboxname'] = $checkbox;

          Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

          Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
          • 11186
          • 38 Posts
          @Mark

          If I put single quotes on it like you have there it creates a container named checkboxname inside a container named containername.

          I want the checkboxname to be an 'item' placed inside a container.

          So yes if you want a folder inside a folder do it your way.