Rules

Documentation Home

What are Rules?

Rules allow you to customize the flow of your form based on answers to your form questions.

Item Rules are used to show or hide individual items.
Page Rules set which page should come next on multi-page forms.

You can find the Rules page by editing your form and clicking the "Rules" button near the top of the editor. Alternately, you can find Item Rules by editing a form item and clicking the "Rules" tab.

When building your form, it is easiest to add Rules last, after you have finished adding and positioning all of your form items. If you move or delete an item that Rules depend on, your form may not work as expected.

Item Rules

Item Rules Example

Item Rules are useful in cases where you need to ask a question that only makes sense when the user has answered a previous question in a certain way. For example, suppose you had this question on the first page of your form:

How many cats do you own?
* none
* 1
* 2
* 3 or more

And this question on the second page of your form:

What are the names of your cats?

It only makes sense to ask for the cats' names if the user chose something other than "none" for the previous question. Rules can be used to make the second question show only in cases where the user did not choose "none" for the first question. To do this, go to the Rules page.

On the Rules page, click the "Add Item Rule" button. Choose "How many cats" as the item to add a Rule for. Set up the Rule to be:

"Hide" | this item when | "How many cats do you own?" | "is" | "none"

This will keep the item hidden if the user chose "none". An alternate way to create this same behavior would be to use multiple criteria. Change the settings so that the Rule reads:

"Show" | this item when | "ANY" | of its criteria match | "How many cats do you own?" | "is" | "1"

Then click the green plus button to add another criteria. Make the next row read:

"How many cats do you own?" | "is" | "2"

Add a final criteria for the last choice:

"How many cats do you own?" | "is" | "3 or more"

This will keep the item visible if the user chose "1", "2", or "3 or more".



Page Rules

Page Rules Example

Page Rules are useful in cases where you have several completely different sets of questions that only make sense to ask when the user answered a previous question in a certain way. For example, suppose you had this question on the first page of your form:

Do you prefer cats or dogs?
* cats
* dogs

Suppose you have two more pages, a page of cat questions followed by a page of dog questions.

If the user chose "cats" you want to show the cat page, and if the user chose "dogs" you want to show the dog page. Rules can be used to have your form choose which page to display next. To do this, go to the Rules page.

On the Rules page, find the box for "After page 1". This box controls which page comes after page 1 (the "After page 2" box controls which page comes after page 2, etc). Click the "Add Page Rule" button and add criteria so that the page's Rule reads:

"Skip to" | "page 3" | when | "Do you prefer cats or dogs?" | "is" | "dogs"

This will cause page 1 to skip to page 3 if the user chose "dogs". If the user chose "cats", the form will continue to the next page as normal.

As with Item Rules, you can use the green plus button to add more criteria. Page Rule criteria are checked in the order in which they appear on the Rules setup page. The first criteria that is found to be true is used.

Repeating Page Rules Example

Repeating Page Rules are useful in cases where you have a group of items that you would like to ask multiple times on a single submission. For example, suppose you had these questions to ask your users:

How many dogs do you own?

and, for each dog:

What is dog #'s name?

If the user selects that they have two or more dogs, the "name" question should be shown twice or more to match

Using a Repeating Page, you can place the "how many" item on one page of your form, and the "name" question on the following page. If the user chose "2" dogs, then the "name" question will show up twice. Rules can be used to have your form repeat any group of items based on the user's selection in a Radio or Dropdown item on a previous page. To do this, go to the Rules page.

On the Rules page, find the box for "After page 1". This box controls which page comes after page 1 (the "After page 2" box controls which page comes after page 2, etc). Click the "Add Page Rule" button and add criteria so that the page's Rule reads:

"Repeat" | "How many dogs do you own?"

This will cause page 2 to repeat the number of times that the user selected in the specified question. Once the page is repeated enough times, the form will continue to the next page as normal.

As with Item Rules rules, you can use the green plus button to add more criteria, but only one Repeating Page Rule is valid per page. The "controller" item must be placed on a page before the repeating page, and its choices should start at 1 (for example, "1, 2, 3, ..."). The number of repetitions will be based on the position of the choice rather than the text of the choice. So, the second choice will cause the page to be shown twice, regardless of whether the choice text says "2", "two", "three", or "green". If you want to want to repeat a page zero times, not showing it at all, then you can setup a "Skip to" rule, as described above.

To show which repetition of the page a user is currently on, you can add the Piping code "[pipe:repetition_#]" in any of the item text. Note: this is only valid inside of repeating items. For example, if your question text is "What is dog [pipe:repetition_#]'s name?", then the user will see "What is dog 1's name?", "What is dog 2's name?", etc.

Additional Information

A page can only repeat itself or move forward, never backward. If you need your form to end on a page before the last page, you can select a Success Page as the page to skip to.

Only a user's answers to multiple choice and text field questions can be used to create Rule criteria.

For order forms, if you use a Page Rule to send the user to a Success Page before they reach the last page of the form, they will bypass the payment process. You can use this to "screen out" users that don't need to pay.

Each repetition of an item will count towards your form's item limit.

Documentation Home