Logic within the Ripple surveys can be set at the survey, page or individual question level. You can even group multiple questions together on a panel and set logic for the entire set of questions. When setting logic on pages or questions you can control if the selected page/question should be visible to the participants based on answers to any other question.
All the logic statements can be created or edited on the Survey Logic tab at the top of the survey. These can also be managed under the “Logic” section of the properties panel when editing any component of the survey.
Adding Survey Logic
- Select the “Survey Logic” tab at the top of the Survey Creator
- Choose the “Add New” button
- In the “Define Conditions” section choose the survey question to base the logic off of
- In the “Define Actions” section select what to do when the defined conditions are met
- Choose the “Save and Return” button
- Remember to choose the “Save Survey” button on the Survey Designer tab
Define Conditions
- Allows selecting which survey question to base the logic off of
- Note that you can have multiple conditions strung together in either an “AND” or “OR” comparisons
Define Actions
- Based on answers to the conditions question you can control various aspects of the survey
- Page Visibility - allows entire pages to be hidden or displayed based on previous answers
- Question Visibility - similar to page visibility, hidden questions can be displayed on demand
- Enable or Disable a question based on previous answers
- Mark a question as optional or required
- Automatically complete the survey, returning the user to the defined redirect
- Set a question’s value (populate an answer)
- Copy question value
- Skip to a certain question
- Run a custom expression
- Create a custom message upon completion
Example - Conditionally Displaying Questions
For this example we will ask participants their preferred method of contact and display the appropriate contact method fields depending on their answer.
- Create a new survey and add the following fields:
- First Name - Single Input tied to first name variable
- Last Name - Single Input tied to last name variable
- Birthday - Single Input Date tied to birthday variable
- Preferred Method of Contact - Radio Group
- Email - Single Input tied to Email Address variable
- Phone Number - Single Input tied to Phone(cell) variable
- Deselect the “Visible” toggle for both the Email and Phone questions
- On the Survey Logic tab choose to add a new logic statement
- Under Define Conditions select the Preferred Method question and the “Email” option
- Under Define Actions select the “Question visibility” option and choose the “Email” question
- Choose Save and Return
- Add a new logic statement and under the Define Conditions select the Preferred Method question. Use Multiple conditions with an “Or” comparison to display the Phone Number question if either the “Phone” or “Text” answer is selected