• subhamkotnala

    (@subhamkotnala)


    Hi Developers,
    I want to create a form that would be used for creation of an user in the frontend. The fields which i want to have are USERNAME,EMAIL, FIRST NAME, LAST NAME, PASSWORD and ROLE. The main part here is ROLE. I want to have a field where the admin can assign a role to the user. NOTE: Only admin have an access to this page in the frontend.
    Is it possible?
    Thanks n advance.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Take a look at a membership plugin https://ultimatemember.com/ such as Ultimate Member or forms plugin such as gravity forms https://gravityforms.com/

    Thread Starter subhamkotnala

    (@subhamkotnala)

    Hi, is there a way to code manually for the registration form because I have tried all the plugins but they did not meet my requirement.

    Gravity Forms paired with their User Registration plugin allows you to assign the role to the user upon successful signup. I’d suggest against letting users select their own ROLE that can lead to a lot of problems, especially hacking attempts, which will slow down your site.

    That said, yes. If you insist on writing a custom plugin you can review https://codex.ww.wp.xz.cn/Customizing_the_Registration_Form.

    Hope this helps. Once you find a solution you are happy with please tag the thread as resolved.

    My apologies, I just reread your original post and realized that you were already planning to only allow admin to change role.

    You can do this on the edit user screen under the admin area.
    Go to Users → All Users
    then hover over the user you want to edit and you will see an option to edit their profile.

    I think that paired with one of those other plugins will do exactly what you are needing! 🙂

    Hope this helps more than my previous post.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Custom User registration form’ is closed to new replies.