Skip to Content Skip to Menu

Radio Button - paths depending on selection

4 years 6 months ago #318224 by jhenderson
We have a yes/no radio button on our registration form. If the user selects no, I want to place them in a different user group, and have them skip two questions on the registration form. Is that possible? Here is the scenario:

Have you completed the Landmark Forum? Yes/No
If yes, When and What City are required Fields
If no, they won't be able to answer those questions.

I don't necessarily want to prevent people who haven't done the course from registering on the site, but do want to limit their ability see some content and leave comments. For that I would need to put them in a user group other than "Registered." I know how to create a user group, but don't know how to put people into different groups when they register. i.e. Graduate (if they answer yes)/Non-Graduate (if they answer no)

If it's not possible to put them the different groups, how do i stop them from continuing with the registration? i.e, if No, don't let them register and display a screen that says "Sorry, but you don't meet the requirements for registering"

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48550
  • Thanks: 8290
  • Karma: 1445
4 years 6 months ago #318240 by krileon
Replied by krileon on topic Radio Button - paths depending on selection
Yes, you can assign a usergroup based off the value of a field using CB Auto Actions. See the below tutorial on how to do this.

www.joomlapolis.com/documentation/291-cb-auto-actions/tutorials/18237-cb-auto-actions-assigning-usergroup-based-on-cb-field-value

Note the tutorial covers frontend registration only. If you want it to apply to frontend and backend registration as well as profile edit be sure to set Triggers for your auto action to the following.

onAfterUserRegistration, onAfterNewUser, onAfterUpdateUser, onAfterUserUpdate

As for hiding fields/tabs based off their selection that is also doable using CB Conditional. Simply edit the fields you don't want them to have access to based off their selection and under Integrations > CB Conditional configure conditions against your field.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: jhenderson

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum