Conditions allow you to show, hide, require, or not require parts of your form based on the values entered into the form.  For example, you would use conditions to only show an optional ‘other’ text field when a certain item in a list has been selected.  Below is a screenshot of a condition that would do just that.

a) First, choose ‘Only show elements if…’ where it shows ‘(Choose a rule type)’.  This means that the condition will only show certain elements if the requirements you specify are met.  b) Next, choose the element you want to test, then the test itself.  In this case the ‘New List’ is going to be tested to see if it equals ‘Other’.  c) Choose the elements to apply the rule to.  For this example we chose the ‘New Text’ element.

So now we have a condition that will show the ‘New Text’ element only if ‘New List’ is set to ‘Other’.

More complex conditions

There are three basic parts to a single conditon: the rule, the test, and the affected elements.
Lets break down the parts of a condition more thoroughly to see how to make more complex behaviors.

Rule

The ‘rule’ is the behavior that is applied to the ‘applied to’ elements, based on the ‘test’.  There are six rules:

  • Only show elements if – This will show the elements if the ‘test’ is passed, and will hide them otherwise.
  • Show elements if – This will show the elements if the ‘test’ is passed, but will not hide them if the ‘test’ fails.
  • Hide elements if – This the converse of the previous rule.  It will hide elements if the ‘test’ is true, but do nothing otherwise.
  • Only require elements if – Like ‘Only show elements if…’, but will cause elements to be required/not required based on whether the ‘test’ is passed or fails.
  • Require elements if – Will make elements required if the ‘test’ is passed.
  • Hide elements if – Will make elements not required if the ‘test’ is passed.

NOTE:  For the rules dealing with whether or not an element is required, you should make the element ‘required’ in the form editor, or the element will not display properly when it becomes required according to the conditions you choose.

Test

The test can be of a single element or multiple elements.  By clicking ‘Add Test’, you will notice that the new test has an extra select box to the left:

If you choose ‘OR’, this means that if either the first or the second test passes, then the whole test is considered passed.  If you choose ‘AND’, this means that both the first and the second test must pass, or otherwise the whole test is considered a failure.  You can mix and match these to create complex tests.  Keep in mind that these tests follow the standard order of operations from propositional logic; that is, the ‘AND’s are tested first.  For example, if you have three tests, x, y, and z, listed as “x AND y OR z”, the whole test would only pass if ‘z’ passes, or if both ‘x’ and ‘y’ pass.

NOTE: Since checkbox lists can have more than one value checked at the same time, the way ‘equals’ and ‘does not equal’ work are not the same as for other items.  If you are testing a checkbox list for equality, as long as one of the checked items has the given value, the list is considered ‘equal’ to it.  For ‘does not equal’, the test is if none of the checked items equal the given value.

Affected elements

This is the simplest part of the condition.  It is just a list of elements that the rule applies to.  These are the elements that are hidden / shown / required / not required according to the tests.

 

More than one condition

If you have more than one condition, they are processed from top to bottom.  That is, conditions at the bottom of the list will overrule those at the top, if they apply to the same elements.  For example, if your first condition makes some element hidden, say ‘Text 1’, and your second condition makes the element visible, then the second will overrule the first.