Related Links
Note: V2 Forms are available to all customers. If you do not have access to the V2 Form Builder and Forms, please read: Enabling V2 Forms
About
Conditional logic uses two core parts to control what happens in a form -- Conditions and Actions. Conditions use operators to text if questions match a certain rule, and actions define what happens when those things are true.
Below are definitions of all available operators and actions, as well as information regarding what kinds of questions they are compatible with.
Operators
Conditional operators are the (usually mathematical) symbols that form part of the condition. Common operators include, but are not limited to: > < =. They allow you to compare a question's answer to either another question, or a string.
Available Operators
Operator | Definition |
Equals (=) | Checks if the answer is an exact match (case insensitive) to another value of a comparable data type. |
Does Not Equal (!=) | Checks if the answer is NOT an exact match (case insensitive) to another value of a comparable data type. |
Less Than (<) | Checks if the answer is lower than another value of a comparable data type. |
Less Than or Equal To (<=) | Checks if the question is lower than or an exact match of another value of a comparable data type. |
Greater Than (>) | Checks if the answer is higher than another value of a comparable data type. |
Greater Than or Equal To (>=) | Checks if the question is higher than or an exact match of another value of a comparable data type. |
Between | Checks if the question falls between (but is not equal to) two other values of a comparable data type. |
Contains | Checks if the answer contains another value of a comparable data type.
If you are comparing a multiselect question, it checks if one of the multiselect answers is an exact match to another value. |
Is Answered | Checks if the question has an answer. It is considered to have an answer if ANY value is present; whether it is a default value, a pushed value, or a user-entered value. |
Is Not Answered | Checks if the question does NOT have an answer. |
Operators: Compatibility with Questions and Data Types
General Rules:
- The reference question must be a data type compatible with the operator (see tables below).
- If comparing to another question, that question's data type must also be compatible with the operator.
- i.e. it is not valid to say "If (integer) = (date/time question)
- If comparing to a hard-coded value, it must be of a data type compatible with the operator.
- i.e. it is not valid to say "If (email question) = 5"
The form builder will prevent you from saving a form with these mistakes.
Compatibility by Operator
Name |
Compatible Data Types |
Incompatible Data Types |
Equals
Does Not Equal |
*Except Multiselect questions |
|
Less Than Greater Than Less Than or Equal To Greater Than or Equal To Between |
*Except Multiselect questions |
Control Type: Multiselect |
Between |
*Except Multiselect questions |
Control Type: Multiselect |
Contains |
|
|
Is Answered Is Not Answered |
Compatibility is by control type:
|
Compatibility is by control type:
|
[ top ]
Actions
Actions dictate what happens when a condition is true. In ProntoForms' case, actions can hide a page, make a question required or not required, and other actions - essentially, they change the user's path through the form.
Available Actions
Action |
Applies to |
Definition |
Is Ignored | Pages, Sections |
This setting makes the form act as if the page/section and its data do not exist. The page/section and its data will not be visible, and will not be referenced elsewhere. Data on Ignored pages/sections:
Any Required questions on ignored pages/sections will not be enforced. |
Is Not Ignored | Pages, Sections |
Shows the page/section in the mobile form. If the page/section had answers in it, was set to ignored, and is subsequently "not ignored" again, the data will still be there, unless the questions have also been cleared or reset. |
Is Visible | Questions | Shows the question in the mobile form. |
Is Not Visible | Questions |
Hides the question in the mobile form. If it is "Required", it wont' be enforced. If it has an answer, it will not be cleared unless another action does this. Any answer it has can affect the rest of the form, and will be submitted. |
Is Required | Questions | Mobile users will be forced to answer the question before submitting the form (unless on an ignored page/section). |
Is Not Required | Questions | Mobile users will not be forced to answer the question. |
Is Read-Only | Questions | Mobile users will not be able to manually alter the answer. |
Is Not Read-Only | Questions | Mobile users will be able to manually alter the answer. |
Is Set to | Questions | Sets a specified answer for a question further ahead in the form. *NOTE: We recommend NOT dispatching into fields that are "set to" a value using conditional logic. It may produce inconsistent results. |
Is Cleared | Questions | Erases an answer to a question (will erase default values). |
Is Reset |
Questions |
Resets a question to its default settings (i.e. return it to its default value). |
Actions: Compatibility
Rules for Actions
- Actions must be valid for the question/item that is being acted on (see below).
- Actions must be performed on pages/sections/questions that occur after ALL the inputs (i.e., sequential).
Compatibility by Operator
Name |
Compatible Question Types | Incompatible Question Types |
Is Visible Is Not Visible |
All
|
None |
Is Required Is Not Required |
|
|
Is Read-Only Is Not Read-Only |
|
|
Is Set To |
|
|
Is Cleared |
|
|
Is Reset |
|
|
Comments
0 comments
Please sign in to leave a comment.