Tutorial: How to dynamically show or hide fields in InfoCapture

Objective

This is a tutorial on how you can make dynamic fields in InfoCapture using a simple example.

Showing a field to enter vehicle license registration only when 'Company car' has been set to 'Yes'.

 

Make sure that 'Reload form on changing' is checked for the 'Company Car' radio button field (as shown below)

This will force the form to reload when it has detected a change in the field, which is the opportunity for it to apply the visibility rules.

Another element to consider is to choose for 'no default' to be set, this means when a user submits a ticket the field will be blank to begin for them to make a choice.


 

Step 1 - Create the form

Create a form in InfoCapture, if you are not familiar with how to create a form please refer to the InfoCapture User Guide.

Please note: Multiple select field types cannot be used to create field conditions.

At least the 'Company car' as a radio type field and the 'License reg' field (string) will need to be created to showcase the dynamic change.

 

Step 2- Setup Field Condition Set

The objective here is to create a condition for the system to use  "If Company car is yes"

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  'Company Car' and set the value to 'Yes'
3. Click 'Save'

 

Step 3 - Create Field Visibility set

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 'License reg' but we still need to create a group in case there is later more than one field we need to hide.

1. Go to the 'Field Visibility tab
2. Click on 'Manage Groups' 
3. Add a New Group called 'License reg'
4. Under Unassigned, check 'License Reg' and move this field into the newly created group. 
5. Click Save and go back to the Field Visibility landing page. You will see 'License Reg' group has been created.
 


Step 4 - Apply conditions to the visibility set

The objective here is to hide this field by default but then set it to be visible when 'Company Car' is 'Yes'.

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 'Company car = Yes' and set all to "Allow". These two lines are now stating that the field should always be hidden unless the condition is met that Company car is yes, in which case the field is shown.
5. You should end up like the example shown in the video, click 'Save' to apply.


 

 

Step 5 - Test the form

From the front end of the form test submitting a ticket and you will notice that the 'License Reg' field is hidden unless 'Company car' is 'Yes'.
 

 

Now you know how to set up dynamic fields you can apply the same fundamentals to form fields specific to your use case.

This likely isn't for a company car, but something custom to the form that you are trying to build.

The set-up required to fulfil your field's purpose is the same as shown here.

If you have any issues when trying to create dynamic fields, please raise a support ticket for the team to assist you.

 

 

Created on 17 March 2016 by Hannah Door. Last modified on 30 November 2023

Was this helpful?  

Share