Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 1 replies (of 1 total)

  • minijuji1
    Participant

    @minijuji1

    *** SOLUTION ***
    Hey guys I had the similar problem. I had 3 different user types. The first two could select between 2 user roles (let’s say “part time student” or “regular student”), as the third one had to have a set role of a let’s say “Teacher”. So I needed two different registration forms that would automatically register with user roles.

    So what I did was to create a user profile field called “Account Type” (dropdown select) with the options of “Part Time Student”, “Regular Student” and ” “Teacher”. I then used @webizone’s solution for a second registration form. I created the template and added to it a few lines of javascript, basically to remove the “Teacher” option from the select menu.

    <script type="text/javascript">
    
    jQuery("#field_17 option[value='Teacher']").remove();
    </script>

    Now that template is for the registration of “Part Time Student” and “Regular Student”. For the teacher’s is just the regular registration form with the “Teacher” option selected by default.
    Now to register the user roles I’ve used @spiritix’s solution from here: https://buddypress.org/support/topic/how-to-assign-a-wp-user-role-based-on-a-registration/

    And to restrict wich forums users can access I’ve used https://wordpress.org/plugins/members/

    Hope this helps. Good Luck and let me know if anyone has a better solution than this. Thanks

Viewing 1 replies (of 1 total)
Skip to toolbar