Question

Photo of Kirsteen Ng

0

Customising registration form, adding person attribute fields

Hello, I am new to Rock and trying to set up a customized registration page for my members. In the current registration form on the external website, new members are prompted to enter their first name, last name, email, gender and birthday. I would like to add more fields such as mobile phones and preferred language onto the form. I suppose I would need to the extra attribute into the database as well. 

Are there any current features on Rock that allow me to do so? Or can I amend the webpage on the code level? Thanks!

[EDIT] I found this link that is similar to what I want to do. However, it would be great if someone could elaborate more on the solution of using workflow to add custom person attribute. Thanks! https://www.rockrms.com/Rock/Ask/Troubleshooting/Questions/761

  • Photo of Daniel Hazelbaker

    0

    Hi Kirsteen,

    I'm assuming you are talking about the login/Register block to register a new account in Rock. If you edit the block settings there are some options in there to prompt for one address type and the phone types.  Anything more custom than that would probably need to be done after they are registered.

  • Photo of Kirsteen Ng

    0

    Hi Daniel, yes it is for the login/Register new account in Rock on the external website. Can you please advise where is the block setting option?

  • Photo of Nick Airdo

    0

    Hi Kirsteen, regarding your new/EDIT question... When trying this with a Workflow (WF) User Entry Form action, in a subsequent action using "Person Set Attribute", you would take each of the WF attributes and set them to a corresponding Person Attribute. You can set their phone similarly using the "Person Phone Update" action. Also, to avoid creating duplicate person records, you would probably also want to use the "Person Attribute From Fields"  and use the "Person Address Update" action to set their address (if you're asking for their address on the form).

    The biggest issue with this WF approach is that there is currently no straightforward way to create a username/login for the person registering vs using the native Login/Register block.  However, with some advanced SQL knowledge and caution, one might be able to use the "SQL Run" action to create a login for the person. However note that doing so could be a way for a hacker to get a login created on another person's record simply because he knew the person's first name, last name and email address.  So, if you did this, you would only want to send a password reset link to the existing email address (since the hacker typically won't have access to the person's email inbox).