Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Webforms for marketers form fields conditional visibility dynamically

We are using WFFM for our landing pages creation. It is very easy for our marketing guys to use that. Now, we are looking at customizing them. For instance, we have the following requirement.

On our form, we display country of residence, but when you select some countries, we want to display one more dropdown called state/province with the states. When user selects other countries, we have to hide the state/provice field. I am banging my head, how can I start implementing this.

Can anyone of you guide me, how to proceed?

like image 831
sbmandav Avatar asked Nov 14 '22 15:11

sbmandav


1 Answers

Try the following:

  1. Create a DropList field on your form in Sitecore
  2. Add an Option named something like "NA" (signifying "Not Applicable")
  3. Mark the field as required
  4. Click on the "Edit" button, under "Rules" in the left pane
  5. In the left box, scroll down to the "Fields" category and enter the relevant information into the "where specific field compares to specific value
  6. In the right box, select "hide element", under the "Actions" category
like image 148
Zachary Kniebel Avatar answered Dec 18 '22 21:12

Zachary Kniebel