I'm trying to build a complex form using MB custom field groups. My form will contain several sub-groups of custom fields vs placing all fields in the same group.
At the very beginning of my form, I want to ask users a question - "Type of Business". The choices are "Hotel" and "Restaurant". I know I can add the 'redirect' attribute to the shortcode to direct users to another page after submission, but instead, I am asking about directing users to a specific form sub-group based on their answer.
Question - "Type of Business"
If user chooses "Hotel" then I want to direct them to the Hotel questionnaire.
If user chooses "Restaurant" then I want to direct them to the Restaurant questionnaire.
how can I set up this conditional redirect using MB forms?
There is a filter hookrwmb_frontend_redirect to change the redirect URL but it only supports checking the shortcode attributes, not the field's value. I'm going to create a feature request to support filtering the redirect URL base on the field's value.
In this case, I think you should create two groups, just show when the user selects type of business.