User role assignment based on option selected in form Registration

By: saifeddine Aghar | Asked: 06/22/2023
ForumsCategory: How-toUser role assignment based on option selected in form Registration
saifeddine Aghar asked 10 months ago
Dear Formidable community m  I'm reaching out to inquire about a specific functionality within the Formidable plugin. I have been using Formidable for form registration on my WordPress site, and I would like to inquire about two specific points regarding the plugin's capabilities, as they are crucial for my current project.
  1. User Role Assignment Based on Form Selection:
    I am working on a user registration form where users can select their desired role from a dropdown or radio button field. Is it possible to assign different user roles based on the selected option in the form? For example, if a user selects the first option, I would like to assign him the role of "Administrator," and for the second option, I would like to assign hi the role of "Subscriber" or any other user role. Could you please confirm if this functionality is supported by Formidable or provide guidance on achieving this requirement?
  2. User Activation based on Radio Field Selection:
    Additionally, in the same user registration form, I have a radio button field where users can choose between "Active" and "Inactive" options. If a user selects the "Active" option, it indicates that the user should have immediate login access and be considered an active user. However, if they choose the "Inactive" option, it signifies that the user should be created but remain inactive until manually activated. Is it possible to configure this user activation behavior using Formidable? If so, could you please guide me on how to achieve this functionality?
  I appreciate any assistance or insights you can provide regarding this matter.
1 Answers
Victor Font answered 10 months ago
Yes, you can assign user role: As for Active/Inactive, it can be done with custom code, but it may be easier for you to use an existing plugin like this one:

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community