You can setup a scenario where the form changes depending on the Category or the Payment package that’s selected. This feature was introduced in version 1.0.395 and provides a flexible option for adding conditional logic to your Forms.
SETUP
In the BePro Listings->Addons menu, you will see the Form Builder sub tab. There you can select which type of “Ajax Form” you would like. You can select between category or package. This is the first step in setting up the conditional logic
If you have selected to use category logic, then you will notice a new Form option while creating or editing BePro Listings categories. Select the form which you believe is best suited for that category.
Payment Packages are controlled via BePro Listings. If you chose to apply conditional logic through packages, then you must activate this feature in BePro Listings, before the ajax forms will work. Follow our BePro Listings payment documentation if you have any questions. Once that is activated, you will notice an option to select the related form while editing or creating a payment package.
NOTE: Each form must have a category input box in it, if you expect to use the category ajax forms. The same goes for the packages, you must have the package input box in each form for the feature to work. We recommend putting the input box at the top of the form, so its easier for users to switch between forms.
One of the most important aspects to note, is how you will get the user to interact with these new dynamic frontend forms. If the user tries to manipulate a form from their profile, then the ajax form will be automatically selected. If you are using the BePro Listings shortcode, you can set bl_form_id=”ajax” in the create_listing_form shortcode as noted in the following example
[create_listing_form bl_form_id="ajax"]
Alternatively, you can create a form with just the category field or just the package field depending on your goals. Show that form to users and the dynamic features will work.
FRONTEND USER EXPERIENCE
As the user changes the category or package, the form will change via ajax. This means that they will stay on the same page, but the form will change.
If you have chosen category ajax forms, then you will notice a few changes on the frontend including
- Via the profile, the form options will be replaced by a simple Add Listing button
- When adding a new listing, the users first sees the category selectbox
- You can only select one category in the form
- As the user selects different categories, the form changes
- Categories that do not have a form linked to them, will not be options in the form
For those who chose to go with package ajax forms, you will notice the following changes on the frontend
- Via the profile, the form options will be replaced by an “Add Listing” button
- When adding a new listing, the users first sees the package options
- As the user selects different packages, the form changes
- Packages without a form attached will result in only the package options being shown
CONCLUSION
Setting up forms to change depending on category or package, is easy with the BePro Listings Form Builder. This makes the setup versatile, use category logic which is popular with product catalogs, or link forms to packages which is popular with business directories.