This is the documentation for ConfiForms Server/Data Center appHowever, this might also work for ConfiForms cloud and in most cases it does. But please see this page to understand the differences between server and cloud versions of the ConfiForms app.
In ConfiForms you have a very powerful macro called ConfiForms Field Definition Rules to setup interactions and rules for your form, one of very powerful features is the ability to filter the options in the fields based on conditions.
There are 2 types of filtering rules:
- Apply filter on field
- Apply filter based on criteria
Apply filter on field
This is quite an easy one to use - you choose the field to apply the filter on and apply the filter (ConfiForms Filters). One note to mention is when you apply the filter on a smart field or on any non-simple field then you actually work on the dataset this field references. So, the filter should be constructed as you are on the dataset this smart field is using.
More about this action in the following tutorials and demos:
- Using ConfiForms Field Definition Rules macro to reduce number of choices in a dropdown field based on the value selected in another field
- Using Field Definition Rule to filter choices in another field
- Using apply filter on field rule
Apply filter based on criteria
This is a very powerful rule and dramatically extends the possibilities and conditions you can define to filter your field options on the form
Consider the following example
We have 2 forms. First form (form 1) is with options, while the second one (form 2) is the form that uses the options defined in the form 1. We have a smart field (dropdown) in form 2 that uses the data from form 1.
The forms look like this in the view mode
What we want to implement is the filter that shows for field "Choice" in form 2, only the values from form 1 that are "not used" in form 2
In the example above there shall be ONLY one option called "test 3" in the "Choice" field
How to achieve that!?
This is where ConfiForms Field Definition Rule with action set to "Apply filter based on criteria" helps
Here is how it can be configured
We apply the rule on "choice" field and tell that you are actually connected to form1 (f1) and use "id" field from the dataset in form 1 to match with the data in current form 2 dataset, comparing it with field "choice"
And that is because smart fields store the references to the records (internal IDs), so we compare it with ID's
And we check the option "Retain only unique rows on the target form" to keep only the records that are not yet "used"
Here is the complete storage
Please be aware that form names were changed from f1/f2 to form1/form2 and you will need to setup the smart field for choice field in form 2 to point at your form 1
In the demo it points to specific page "38862971"