Skip navigation |

Show form items depending on values chosen in other dropdowns

It is possible to add questions to forms that only appear when the visitor selects certain options from dropdown lists elsewhere on the form.

Last updated: 09 May 2012, 15:55

What it Does

This allows you to have questions on the form that appear based on the response to a previous question.

Important note

This feature makes use of the Name property of form questions. Every question needs to have a Name. It is very important that you do not use spaces in your names. You must just use alphabetic characters without spaces or punctuation.

How to set it up

Add a row to the form with the Input Type of Dropdown . Enter the relevant options into the parameters box, separated by a semi colon (;).

In our example, we have added a row with the following settings:

Name : Referral
Label : How did you hear about us?
Input Type : Dropdown
Parameters : Television;Radio;Newspaper;Colleague;Friend;Website;Other

You can then add the rows into your form which will depend on the values in this field. To set this up, you need to add the following to the Parameters field (at the start before any other parameters).

{dependsOn::formItemName|value1;value2}

In this example:

  • formItemName is the name of the Dropdown list that we created earlier.
  • value1;value2 is a semi colon (;) separated list of the values in the Dropdown list that will cause this field to be shown.

In our example, we have added four fields, with the following settings:

Name : Television
Label : What TV channel/radio station was this on?
Input Type : Single Line Text
Parameters : {dependsOn::Referral|Television;Radio}

Name : Newspaper
Label : What newspaper were you reading?
Input Type : Single Line Text
Parameters : {dependsOn::Referral|Newspaper}

Name : Website
Label : What was the URL of the website?
Input Type : Single Line Text
Parameters : {dependsOn::Referral|Website}

Name : Other
Label : Please specify...
Input Type : Single Line Text
Parameters : {dependsOn::Referral|Other}

What it looks like

 

Cookies are used by nearly every website to improve your web browsing experience. Recent government legislation (the e-Privacy Directive) means that we are obliged to seek your agreement to the use of cookies when you visit our website. Two of the cookies that we use are essential for this website to operate and have already been set. You may delete and block all cookies from this site, but if you do so, parts of the site will not work. To find out more about the cookies that we use, please see our privacy policy.