You can hide or show web form elements depending on the other form elements values by adding condition expression under Condition section of your form element. These expressions are called FEEL expressions and you can learn about them here.
Example: #
Create a Doc Config of type Web Form and add form elements as shown below in the steps. Refer to this article for more information on how to create a web form.
Depending on Total Car Sale Value, hide the other form elements in your web form.
Steps to add Conditions:
- Web Form Butler will create a Key name for every form element added into your form. When you select the controlling form element, i.e., Total Car Sale Value, the system displays the Key field for that element under the General section in the left window. Make use of this to add conditional rendering for the other fields.
- Let’s say, Hide the Select/Picklist form element “Have you been with us before” when the Total Car Sale Value is less than 100.
- Select the field and go to Condition section. Open pop-up editor and start typing the key name of “Total Car Sale Value” form element i.e., “Amount_00D…” in our example. Then editor will show the Key name to select, select that and add the condition as shown below.
- Similarly, Hide the Radio group form element “What car do you like most” when the Total Car Sale Value is less than 200.
- Hide the checkbox group form element “What sort of insurance…” when the Total Car Sale Value is less than 300.
- Instead of adding condition to individual form element, you can also add condition to a group element as shown below.
- Create a form request and test the conditional rendering by changing the amount value as shown below. The form hides all three elements when the Total Car Sale value is less than 100.
- When Total Car Sale value is less than 200.
- When Total Car Sale value is less than 300.
- The form hides the Group element when only “Comprehensive” is selected in the “What type of insurance…”.
  Â