5. Rules — Asking Only What Applies

Open the builder →

The Idea In One Sentence

A rule lets you ask a question of some people and not others, based on what they have already answered.

That is the whole of it. If somebody says they are a customer, ask them which plan. If they say they are not, do not.

Where Rules Live

There is no Logic tab, and its absence is deliberate. A single list of every rule in a form is ordered by nothing, and somebody reading a question has no way to tell whether anything governs it — which is how a form ends up with two rules that contradict each other and nobody notices until a respondent does.

So a rule lives beside the question it decides. Select a question, and the panel on the right shows every rule that reaches it, under the heading When to ask this.

Underneath that heading is a line that changes with the situation, and it is the fastest way to know where you stand:

  • A rule reads an earlier answer, so the first question in a form has nothing to depend on. — you are on the first question. There is nothing to build a rule from yet.
  • Asked of everyone, unless you add a rule. A question with rules is only asked when one of them matches. — this question has no rules.
  • Asked when any of these matches. Two rules are an "or" — add a second rather than one longer sentence. — this question has rules.

Writing One

Press Add a rule and you get a sentence with blanks in it, reading left to right:

Ask it / Skip it — when — which question — comparison — value

Ask it or Skip it comes first, because that is the decision you are making; everything after it is the reason.

Which question offers only the questions that come before this one. That is not a restriction so much as an arithmetic fact: a rule reads an answer, and an answer the respondent has not given yet is not there to read. Rather than letting you write such a rule and refusing it later, the list simply does not offer it.

Comparison is one of nine:

is the answer is exactly this
is not the answer is anything but this
contains this text appears somewhere in the answer
does not contain it does not
is greater than for numbers, ratings and scores
is less than the same, the other way
is empty they left it blank
is not empty they answered it, whatever they said
is any of the answer is one of several you list

is any of exists so that "one of these five plans" is one rule rather than five that have to be kept in step.

Value is the last blank, and it disappears entirely for is empty and is not empty, which do not need one. For a question with a fixed set of answers — a dropdown, a single select — the value is a list of that question's own options, not a text box. You choose the answer rather than typing it, so it is impossible to write a rule that looks perfectly correct and can never match.

Two Rules Are An "Or"

A rule is one condition: one earlier answer, one comparison, one value. If you need two conditions to reach the same question, add two rules. The question is asked when any of them matches.

This is why the panel says so rather than leaving you to find out.

When You Write One It Cannot Mean

Two things the panel will tell you about, in the rule itself, while you can still fix them.

A rule with nothing to compare against. Choose an answer for this rule, or use "is empty". As it stands it would match before anybody answers. An empty value matches an unanswered question, so the rule would fire before the respondent had done anything at all.

Two rules that disagree. Another rule says the opposite for this answer. Skipping wins when two rules disagree. If one rule says ask and another says skip for the very same answer, the form skips. A question shown by mistake is one somebody was not meant to see, so the safe outcome is the one that wins — every time, predictably, rather than depending on which rule you wrote first.

Deleting A Question That A Rule Depends On

If you delete a question that other rules read, the rules that read it go with it, and the builder tells you which ones by name. It does not leave a rule pointing at something the form no longer has.

What Stops A Publish

Three things are structurally broken rather than merely unwise, and FlyForms refuses to publish a form carrying one:

  • jumps that loop back to each other, so a respondent could never leave;
  • a rule that names something the form no longer has;
  • a rule that reads an answer that comes later in the form.

You cannot create any of these in the panel — that is what the earlier-questions-only list is for — but a form can arrive by other routes, and the check runs regardless.

One more is reported as a warning and blocks nothing: nothing can make this question appear, meaning no combination of answers reaches it. That may well be deliberate while you are half way through an edit, so you are told and left alone.


Next: Making it look like yours →