The project contains a set of actions for Web Forms for Marketers rule engine (Rule Set Editor) to customize forms fields.
The actions enable selection-dependent inputs for the Sitecore Web Forms for Marketers module.
Selection-dependent input requires users to enter additional information related to an initial selection before they can complete a form. In almost all cases, it let make web forms simpler and more responsive to user actions and personalize forms depending on target audiences.
- Changing
specificfield tovaluehide element
The selected element is hidden when the specified field matches to the specified value.
- changing
specificfield tovalueshow element
The selected element is shown when the specified field matches to the specified value.
- changing
specificfield tovalueclear field value
The selected element value is cleared when the specified field matches to the specified value.
- changing
specificfield tovaluecopy specific field value
The selected element value is taken from another field when the specified field matches to the specified value.
- changing
specificfield tovalueredirect visitor tospecificpage
The visitor is redirected to the specified page when the specified field matches to the specified value.
- changing value trigger
eventforspecificfield
Triggers the specified event for the specified field when value of the selected field is changed. Possible event values – HTML DOM events
- changing
specificfield tovaluerunclient side script
Runs client side script when the specified field matches to the specified value.
- changing
specificfield tovalueoperatorspecificfield tovaluehide element
The selected element is hidden when the specified fields matches to the specified values.
- changing
specificfield tovalueoperatorspecificfield tovalueshow element
The selected element is shown when the specified fields matches to the specified values.
- changing
specificfield tovalueoperatorspecificfield tovaluerunclient side script
Runs client side script when the specified fields matches to the specified values.
Note: prefer to use condition “where true (action always execute)” for all client side actions.
The set of actions extends Web Forms for Marketers fields behavior if the conditions are met.
-
disable element
Disables the selected field
-
set read only element
Makes the selected field readonly
-
use the default value from cache
specificrecordReads the value of the specific cache record and makes it the current field value
-
use the default value from session
specificrecordReads the value of the specific session record and makes it the current field value
-
use the default value from visit
specificfieldReads the value of the specific visit field and makes it the current field value. Allowed visit field name: areacode, businessname, city, country, dns, isp, latitude, longitude, metrocode, postalcode, region, url.
-
use the default value from
specificfield matchingregexpatternReads the value of the specific form field, extracts a match according to the specified regex and makes it the current field value
The extension for the Web Forms for Marketers module supports both ASP.NET Web Forms and MVC engines
The example of client side actions usage is described in the [document] (https://github.com/zigor/morph/raw/master/doc/Selection-dependent%20inputs.docx)