Tutorial: How to create dynamically shown or hidden fields in InfoCapture


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

Make sure that  "Reload form on changing" is checked for this radio button field, allowing the form to reload when it has 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 a 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 a 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 is later more than one field 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". These two lines are now stating that the field should always be hidden, unless the condition is met that marital status = married, in which case reveal the field.
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.






Last modified on 31 August 2018 by Jon Mulhern
Created on 16 March 2016 by Michael Christian

Was this helpful?  

1 Like


{{ comment.user.is_me ? cc.translations.my_comment : comment.user.name }} {{ comment.user.is_me ? cc.translations.my_comment : comment.user.name }} {{comment.user.name}} [wrote]...
[Reply] [Like] [Unlike]  {{comment.like_count}} [person] [people] [liked this] [Edit] [Delete] {{ comment.timestamp.date_str }}