We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36933
    • 35 Posts
    I know there has been some discussion about this, but the last post on the thread I was reading is a few months old and I have to be honest it became more technical than my ability.

    I need to be able to have members sign up for my site and put in things like their twitter name, linked in and other custom details. I can see that I am able to do this from the back end using extended fields, but I want to be able to put this on a register form using the login snippet and in turn on the update profile page using the login snippet.

    Is there a not to technical way of doing this?

    cheers
    Brad
      • 28215
      • 4,149 Posts
      You can either do this through a hook in Register if you know some PHP, or file it as a feature request for Login (Register) on github and wait till we add something for it:

      http://github.com/splittingred/Login/issues
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 36933
        • 35 Posts
        I have a basic understanding of php so I might be able to give it a go. Any pointers on where to start?

        I can see that the extended fields are stored as a string with separators, so my guess is that php would have to get the vars from the form, implode them into the required string format then store them. On the update profile page php needs to explode the string, layout the fields then implode to save.

        Am I on the right track?
          • 28215
          • 4,149 Posts
          Quote from: edialedarb at Aug 11, 2010, 02:13 PM

          I have a basic understanding of php so I might be able to give it a go. Any pointers on where to start?
          Use the &hooks=`` param in the latest Register version (which is the same as in FormIt, which is doc’ed here: http://rtfm.modx.com/display/ADDON/FormIt ), and add a custom hook (which is just a snippet). In that snippet, store the data into the profile’s extended field.


          I can see that the extended fields are stored as a string with separators, so my guess is that php would have to get the vars from the form, implode them into the required string format then store them. On the update profile page php needs to explode the string, layout the fields then implode to save.
          Correct. Your hook would do that, and the ’extended’ field in modUserProfile would store it as JSON. I’m not sure that editing custom fields is 100% supported in UpdateProfile yet (it needs to add a &hooks param as well), but should be. If it’s not, feel free to submit a feature request.

            shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com