What are Rules?
Rules allow you to customize the flow of your form based on a form user's answers. There are two types of Rules:
- Item Rules show or hide form items.
- Page Rules determine which page comes next on multiple page forms.
Item Rules
Item Rules Examples
Item Rules are useful in cases where you need to ask a question that only makes sense when the form user has answered a previous question a certain way. For example, suppose you have 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 cats' names if the form user chose something other than "none" for the previous question. To do this, go to your form's "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 hide the item if the form user chose "none". An alternate way to create this same behavior would be to use multiple criteria. Change the settings to be:
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:
How many cats do you own?
| is
| 2
And 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 form user chose "1", "2", or "3 or more".
Page Rules
Page Rules Examples
Page Rules are useful in cases where you have several completely different sets of questions for different situations. For example, suppose you have 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 form user chose "cats" you want to show the cat page, and if the form user chose "dogs" you want to show the dog page. To do this, go to your form's "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 set up the Rule to be:
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 form user chose "dogs". If the form 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 evaluated in the order they've been set on the "Rules" page. The first criteria that's 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'd like to ask multiple times. For example, suppose you have these questions:
How many dogs do you own?
and, for each dog:
What is dog #'s name?
Using a Repeating Page, you can use a multiple choice item to ask "how many" on one page of your form, and a "name" question on the following page. If the form user chooses "2" dogs, then the "name" question will show up two times to match. To do this, go to your form's "Rules" page.
On the "Rules" page, find the box for "After page 2". Click the "Add Page Rule" button and set up the Rule to be:
Repeat
| How many dogs do you own?
This will cause page 2 to repeat the number of times the form user chose in the specified question. After the page has repeated enough times, 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, 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", "dos", "ten", "purple", etc. If you want to repeat a page zero times, not showing it at all, then you can instead make a "Skip to" Rule to skip over it entirely, as described above.
To show which repetition of a page the form user is currently on, you can add the Pipe code [pipe:repetition_#]
in any text on the repeating page. For example, if your question text is "What is dog [pipe:repetition_#]'s name?", then the form user will see "What is dog 1's name?", "What is dog 2's name?", etc.
When creating repeating pages, each repetition of an item will count toward your form's item limit. For example, if you make a page repeat up to three times, all the items on that page will count three times.
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.
For Order Forms, if you use a Page Rule to send the form user to a Success Page before they reach the last page of your form, they'll bypass the payment process. You can use this to "screen out" form users who don't need to pay.