Jump to content

Users - required fields only for frontend registration?


torf
 Share

Recommended Posts

I have a page that has frontend and backend users. So frontend users register themself via the old Login/Register module and get assigned a special guest role, while backend users are made by the site-admin in backend. My problem is that frontend users have a lot of required fields (from name, phone number and address up to specific company information), while backend only need login, email, password and their role. If I mark all those extra fields as required, the site admin would have to fill them out in the backend as well when adding a new user.

Is there any hook for adding the required status of those extra fields only in the frontend? Or seperate frontend and backend users in another way?

Link to comment
Share on other sites

Perhaps the easiest thing to do would be to make the fields of the user-facing form required, perhaps using JavaScript, or adding the required attribute:

<input type="text" id="role" name="role" required>

If you want to hook into the module, take a look at https://github.com/ryancramerdesign/LoginRegister. If all else fails, hooking before Inputfield::render (see the example on the page just mentioned) and then replacing strings in the form HTML is an option.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...