Jump to content
cjx2240

Make fields required on registration, front-end only

Recommended Posts

Does anyone have a suggestion how I can make fields required during user registration, without making it so that admins also have to fill them out when making new admins?

Thanks in advance!

Share this post


Link to post
Share on other sites

You can use the hasRole method to test whether the current user is "admin" to determine if a field should be required.

  • Like 1

Share this post


Link to post
Share on other sites

Hm, thanks for the suggestion but that doesn't seem to work, I get the following when registering on the front-end.

"Warning (requiredIf): dependency field 'hasRole' is not present in this form."

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...