How to create dynamically shown or hidden fields in InfoCapture

By Michael Christian on 17 March 2016
1 Like


This is a tutorial on how you can make dynamic fields in InfoCapture using simple example 
Showing spouse's name only when marital status is 'married'

Make sure that  "Reload form on changing" is checked for this radio buttons field allowing the form to reload when it detected some changes in the field.


Step 1 - Create the form

Create the following form in InfoCapture, if you are not familar on how to create form please refer to the InfoCapture User Guide.


Step 2- Setup Field Condition Set

The objective here is to create a condition for the system to use  "If Marital status is married"

1. Add new field condition set as shown below and make sure that "User for fields rights" is checked.
2. Under Field Conditions, check  'Marital status' and set value to 'married'
3. Click 'Save'


Step 3 - Field Permission Group

Now we need to group all the fields which are meant to be hidden unless certain conditions are met, in our case it is just one field which is Spouse's Name but we still need to create a group in case there are more than one fields we need to hide.

1. Go to 'Field Permission'
2. Click on 'Manage Group' 
3. Add New Group called "Spouses Name'
4. Under Unassigned, tick 'Spouse's name and move this field into newly created group'. The idea here is some fields can be grouped together so more than fields can be set to be visible at the same time based on certain conditions.

5. Click Save and go back to the Field Permission page. You will see Spouses Name group has been created.

Step 4 - Setting Field Permission Rule

The objective here is to hide this field by default but then set it to be visible when Marital status is 'married'.

1. Click Add Condition Set
2. Choose Default (Always) then click Add
3. Set all these to 'Deny'
4. Add Condition Set again and this time choose Marital status = married and set all to "Allow"
5. You should ends up like the example below, click 'Save' to finish this step.


Step 5 - Testing The Form

Check out the form and you will notice that Spouse's name is hidden unless Marital status is 'married'.
Test by submitting new form from the InfoCapture app and check the behaviour.