Validation Example: If Other Please Specify
When you add a Multiple Choice Question or Select Many Question in your survey you may want to add an "Other" option that allows the survey participants to respond with information that is not listed as an option in your question. To ensure that participants that select "Other" enter information, you can create a Validation Message to validate whether a user that chooses "Other" also fills in the Text Box for the "Other" option.
Here are steps to add this validation:
- In the Edit tab, enter your Multiple Choice or Select Many question.
- In the Edit tab, right-click the new question, and click Insert After.
- In the Querstion Gallery, click the "Other" Text Box question type.
- Click OK.
- In the Edit tab, right-click the "Other" Text Box question, and click Insert After.
- In the Querstion Gallery, click the Validation Message question type.
- In the question editor for the Validation Message, enter your text: "Please specify a value for Other."
- Click the Ask if button to add an Ask if conditional.
- For the Ask if drop-down list box, choose Other (at the end of the list) and click OK. This will bring you to the Ask if Conditional page where you can enter a conditional statement.
- Enter the condition for the Validation Message question, and click OK. For example, here is a conditional statement that displays the Validation Message question when the "Other" option is selected in question Q1 of a survey:
For more information on formulas in Vista, see Formula Commands.
- Click OK again to return to the Edit tab. You will notice that there is an error on the Edit tab because the Validation Message question is not separated from the "Other" Text Box question by a page break. These question must be separated by a page break in order for the condition placed on the Validation Message question to be evaluated.
- In the error message, click Fix it for me. You can also fix this error by right-clicking the "Other" Text Box question and then clicking Break After.
- Click Save.
Here is how your final questionnaire will look: