When creating and editing form fields, GatedContent.com provides you with a powerful rule engine to tailor behaviour and functionality.

  

Triggers

Firstly, you will need to select when the rule will run. This is fundamental and should be based on overall objective of the rule. Rules can be run at different points in the life-cycle of a page, it is important that rules are run when the data they will be reacting to and using is actually available. 


Rules that run continuously will react in real-time to changes within the form, whereas those that run on form load or submission will run only once at those points in the form's life-cycle.

An important note for rules that run on form load; these will only run at the very beginning, in the fraction of a second before the form displays, this means the user has not had an opportunity to complete any fields, if there is no prepopulation and if your rule is dependant on retrieving data from certain fields it will not work. For example, you may want run the rule on form load if it is based on a gate attribute.  


Running the rule on form submission occurs between when the user hits the submit button and the data being sent to the MAP, this is a great way of making last minute changes to the form. For example, it is possible to populate a hidden fields based on what the user has submitted. 


You only run rules continuously if the user needs to see the effect on the page in real-time. This can be useful for showing or hiding fields based on what data the user has entered into the form.


Conditions & Building Rules 

This is where form functionality takes on a much greater level of cusomisability. Using a combination of Conditions, OR Group & AND Groups it is possible to tailor each gates behaviour to your specific needs. Rules created here will override settings found in manage form types


Important Note: The actions are only applied to the field you are editing. Conditions can examine any field but they cannot change the state of other fields.  


The rule builder has 3 main sections:

1. IF these conditions are true

2. THEN perform these actions

3. OTHERWISE perform these actions 


You can have as many AND/OR rules as is necessary but bear in mind the more conditions and steps added the more complex the rule will become. 



Example 

Here is a quick example, lets say you wanted to create a checkbox that only appears if the USA, Mexico or Malaysia has been selected in the country drop down. 


Firstly, create a form field and select checkbox from the field type drop down. 

The trigger should be continuous because you want the form the adapt in real time to the users actions. 

Then you add a condition, this rule is based on the country selected so the condition is: Field value>Country>is in>USA,MX,MY.

You can enter the country codes list by separating the values with a comma. 

Now the rule knows what conditions it is working under the next step is choosing what actions should occur. 

The correct action here would be to show this field, otherwise hide this field.

Picklists

It is possible to create drop-downs that are only displayed under certain conditions. 

There are two ways to add options to your picklist, you can add them one at a time by clicking Add an option and entering a value which should match the receiving field in the MAP and a label which will be visible to the user. 

If you have a very long list of options, you can add these all at the same time by clicking Add bulk options and submitting a list with one option per line in the format: 

Value|Label 

Value|Label 

Value|Label 


Multiple Rules

Something to bear in mind when using multiple rules is that the rules will run in order, the last rule that is run will take precedence over the others.  


Rules can be tricky, if you need some extra support or have any questions simply click "+ New Support Ticket" above.