[Forminator Pro] Change user role after a submitted form has been approved.

0

A store that sells B2B and B2C would have two user roles Customer and Wholesale.

A registration form can be created that can assign a user role to the new user after the form has been submitted and approved.

Now I want to make a request form for existing users with the customer user role. When they submit the form, admin can approve the submission and the Wholesale user role is automatically assigned to them.

  • Patrick Freitas
    • FLS

    Hi Edward Steel

    I hope you are doing well.

    Thank you for the suggestion.

    This would be possible with some custom coding https://wordpress.org/support/topic/user-approval-hook/

    It receives two params, the first one is the user ID

    do_action( 'forminator_activate_user', $user_id, $signup->meta );

    Which can be used to switch the role.

    Note, that creating the custom code is out of our scope but we also forwarded this request to our plugin team.

    Best Regards
    Patrick Freitas

  • Patrick Freitas
    • FLS

    Hi Edward Steel

    Just an update here,

    The provided hook won’t work sorry for that, I see what you mean by the second form, but if we use a new registration form it will not allow you to submit the form, it has to be the regular form.

    The main issue is the “approval” part, for regular forms there isn’t an approval feature such as the registration form and it would require to be done manually.

    We do have some ideas for better control over user registration and I forwarded this to our developers as well.

    Best Regards
    Patrick Freitas