A conditional statement

SportSuite Forms –
Conditional
Statements
Thursday 8th June 2017
What is a conditional
statement?
A conditional statement is a feature that changes
what question a respondent sees next based on how
they answer the current question. Also known as
“conditional branching”, “branch logic”, “skip logic”, or
“question logic”, conditional statements create a
custom path through the survey that varies based on a
respondent's answers.
What does a conditional
statement allow you to do?
• Include extra questions based on a response
– Example: http://www.lrsport.org/forms/view/1399
– Example: http://www.lrsport.org/forms/view/1440
• Change the questions altogether based on a response
– Example: http://www.lrsport.org/forms/view/1303?page=2
Making a test instance
Add new instance > name = test > type = open > save
Click ‘view form’ and have this open at all times whilst building your form.
Each time you make a change to your form that you would like to test/check
the display refresh the page in your browser.
http://www.lrsport.org/forms/surveys/370906
Where to find conditional
statements
http://www.lrsport.org/for
ms/surveys/370906/design
1.
How to build a yes/no
statement
Create your initial question – this must be a selection radio button question with only two options: yes and no
2.
Create the questions to go within the conditional statement – both the question to display if a user selects ‘yes’ and if
applicable the question to display if a user selects ‘no’. Note you can leave the ‘no’ blank.
3.
Drag the conditional statement into your form on the same page as the questions you have just created.
4.
Hover over the ‘when’ bar and click ‘edit’.
a)
Target = your initial question created in step 1
b)
Test = ‘is “Yes”
c)
Click submit
5.
Drag your question that you want users to answer if they select ‘yes’ for the initial question into the ‘when’ area
6.
Drag your question that you want users to answer if they select ‘no’ for the initial question into the ‘otherwise’ area. Note
this area can be left blank if they do not need to answer an extra question
7.
Check that the question is working as expected in your test instance view.
How to build a checkbox
statement
1.
Create your initial question – this must be a selection question with the ability to select multiple answers turned on
2.
Create all questions to go within the conditional statement
3.
Drag the conditional statement into your form on the same page as the questions you have just created.
4.
Hover over the ‘when’ bar and click ‘edit’.
a)
Target = your initial question created in step 1
b)
Test = ‘has value (checkboxes only)’ - in the white space copy and paste the answer that you are setting up the conditional
statement for. Note conditional statements are case sensitive.
c)
Click submit
5.
Drag your question that you want users to answer if they select the answer for the initial question that you have copied and pasted
into the conditional statement into the ‘when’ area
6.
If you have an alternative question for users to answer if they do not select the answer used in the conditional statement then drag
that question into the ‘otherwise’ area. Else leave this area blank
7.
Check that the question is working as expected in your test instance view.
8.
Repeat steps 3-7 for each answer within your initial question that requires a conditional statement. Note each answer will require it’s
own conditional statement on that page.
How to build a dropdown
statement
1.
Create your initial question – this must be a dropdown question
2.
Create all questions to go within the conditional statement
3.
Drag the conditional statement into your form on the same page as the questions you have just created.
4.
Hover over the ‘when’ bar and click ‘edit’.
a)
Target = your initial question created in step 1
b)
Test = ‘matches Pattern’ - in the white space copy and paste the answer that you are setting up the conditional
statement for. Note conditional statements are case sensitive.
c)
Click submit
5.
Drag your question that you want users to answer if they select the answer for the initial question that you have copied
and pasted into the conditional statement into the ‘when’ area
6.
If you have an alternative question for users to answer if they do not select the answer used in the conditional statement
then drag that question into the ‘otherwise’ area. Else leave this area blank
7.
Check that the question is working as expected in your test instance view.
How to build a number
statement
1.
Create your initial question – this must be a number question, validation must be turned on and the question must be required.
2.
Create all questions to go within the conditional statement
3.
Drag the conditional statement into your form on the same page as the questions you have just created.
4.
Hover over the ‘when’ bar and click ‘edit’.
a)
Target = your initial question created in step 1
b)
Test = ‘is numeric’ - in the white space type the minimum and maximum number the user could provide for the conditional
statement you are setting up. Note if you have a question where the answer includes number and words then you would not
use this type of statement. This is for numbers only.
c)
Click submit
5.
Drag your question that you want users to answer if they select a number within the range set up in the conditional statement into
the ‘when’ area
6.
If you have an alternative question for users to answer if they type a different number then drag that question into the ‘otherwise’
area. Else leave this area blank
7.
Check that the question is working as expected in your test instance view.
8.
Repeat steps 3-7 if you have multiple ranges of numbers that require a different question to appear
Conditional Statement
Recommendations
1.
Always set up a test instance, and check conditional statements are working
as expected as you go along
2.
Use a dropdown question (has value) for yes/no questions to ensure better
presentation of your survey to users
3.
Never make questions that are part of conditional statements required
4.
Create your own labels for questions in the export to make it easier to view
the data.
Any Questions?
Next webinar…
SportSuite Forms – Email Invitations
Tuesday 13th June 2017
10am
Book now: sportsuite.co.uk/webinars
Direct link: http://sportsuite.co.uk/webinars/2017/06/sportsuiteforms---email-invitations
Thank you
[email protected]