You use rule-based forms to collect information from the responders of the form and, based on their input, display different fields of the form.
EXAMPLE: You have a form where the users fill out their address. You want to display the State field only to users whose address is in the United States. In this case, you can create a rule for this form that whenever a respondent selects USA in field Country, a field State is displayed. To other users the field State will be hidden.
PREREQUISITES: You can create rules only for MVC forms.
You can create conditions for any field of the form and the actions that you can specify after the conditions are met are the following:
The rules are executed in the reverse order – the rule that you create last has the highest precedence.
To create form rules, you must first create the form together with all of the fields and steps. Afterwards, to create a rule, perform the following:
NOTE: If, as condition, you are using a field that is multiple choice or checkboxes, you do not have operators contains and doesn’t contain, because the input is predefined.
EXAMPLE: If you want to create a rule for all users whose country is the USA, in the first dropdown box select Country, in the second dropdown box select is, in the input field, enter USA.
To add more conditions, click the plus icon.
You can specify conditions for any of the fields of the form. When the form responder meets the conditions that you specify, you define the actions that are going to be executed.
Under THEN…, perform the following:
To hide a field, open the widget for editing and in select dropdown box Hidden field.
EXAMPLE: You want a field ABC to be hidden for everyone, except for a certain group of people. In this case, open field ABC for editing and select Hidden field dropdown box. Afterwards, create a rule to show field ABC, based on the desired condition.
NOTE: You can hide fields that have required input.
Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.
This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.
This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.
The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important