Keep it simple: that's probably the most important rule of survey design. The more complicated your survey is, the more likely that evaluators will make mistakes, answer questions that they should skip, and skip questions that they should answer. The result: corrupt data, confusing and ambiguous results, and incomplete surveys. Worst of all is when the evaluator's reaction to a complicated survey is "No thanks!" -- and you don't get any data at all!


But what if you're trying to find out some complicated things, and you've got conditions leading to conditions? With Presto Logic, it's easy -- you just show what you need to show, when you need to show it.


Let's start with a simple example. Here's a short Presto survey used to register attendees for an event:


To follow the golden rule and keep it simple, we'd like to only ask if the attendee will be attending the banquet if they will be attending the event on Saturday, and only ask if they have special meal requirements if they will be attending the banquet. In other words, we need "logic in layers"

.

Presto Logic to the rescue! It's easy to do "logic in layers" because of this basic rule of Presto Logic:


If a question is hidden by Presto Logic, any questions that are only shown based on that question are also hidden.


So, we need two rules, as follows:

  1. If the answer to "Which days will you be attending?" includes Saturday, show "Will you be attending the Saturday banquet?" 
  2. If the answer to "Will you be attending the Saturday banquet?" is yes, show "Do you have any special meal requirements?" 


In the Presto Logic editor, the rules look like this:



Now, the survey reveals questions in layers:






Of course, since we're asking about "other" meal requirements, we should have an open-ended "Other" question...




...and some Presto Logic to handle it (remember, you learned how to do this in the "If other..." Presto Logic pattern): 



And, since we're asking about allergies, we might as well add another question to clarify what allergies...


...and more layered Presto Logic to show the question only if "Allergies" is selected in the previous question:


Our banquet questions are answered -- but it's about to get more complicated!


Now let's ask our conference attendees about their housing needs -- but only if they'll be staying for more than one day. For this, we need a rule that checks "Which days will you be attending" and does the following:

  • If "Which days will you be attending?" is answered Friday AND Saturday, OR 
  • If "Which days will you be attending?" is answered Saturday AND Sunday... 
  • ...then show and require a question asking if they need overnight accommodations. 


The survey looks like this:


 

...and the Presto Logic looks like this: 


See the difference? Here we have two triggers within the same rule, connected by an OR. This will handle the two cases we want to trigger on (Friday AND Saturday, or Saturday AND Sunday), as well as the case where all three are selected, but ignore any other combination.


Now you know how to do Presto Logic in layers! For an interesting exercise, take a look at our completed survey at http://hellopresto.com/go/presto-demos-presto-logic-logic-in-layers/300202. We added some more questions and some more rules. Can you figure out what rules are needed to get the survey to behave the way it does? Everything you need is in this article, so see if you can make your own survey do what this example does!