This article describes how to apply form rules to custom form fields.
First you create a new fields for the form, using procedure Create new input fields for forms, then, you make the field to support rules.
The Controller must be implemented the following two interfaces:
ISupportRules
Dictionary<ConditionOperator, string>
ConditionOperator
ITextField
ISubmitFormField
ISectionHeaderFormField
IParagraphFormField
IFileFormField
ICaptchaFormField
IDropDownFormField
IEnumerable<string>
IMultipleChoiceFormField
ICheckboxFormField
In the Model, you must implement IHideable to allow show and hide actions of that field.
IHideable
For the field that participates in conditions, you must implement the following:
data-sf-role="<wrapper_container>"
data-sf-role="<element_selector>"
FormRulesSettings
FormRulesSettings.addFieldSelector("<field_wrapper_container>", "[data-sf-role='<field_element_selector>']", "<additional_filter>")
<field_wrapper_container>
[data-sf-role='<field_element_selector>']
<additional_filter>
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