...
Let's see how the 2 last macros (Field Definition Rules) are configured
See an important bit on the filter field - we take only "active" rows. This "isactive" field value comes from an SQL, from a field "is_active"
This rule fires when checkbox is checked
Here is how the 2nd Rule is configured
In a filter we tell it to take ALL (this rule fires when checkbox is not checked)
Dropdown choices from another form
This is a 2 version of the form, when your dropdown field is actually takes the values from another ConfiForms Form (using a "smart" field, a "smart" dropdown)
In the edit mode the form looks exactly the same as in the 1st version.
But the difference is in how the "choices" field is configured
It is configured to take the vlues from another ConfiForms Form with the following structure
- Field to store name (field types is "text")
- Field to store the status (active or inactive), with field type "checkbox"
Same set of values as in the database version
And the "choices" field is configured like this:
Taking the values from a "choiceForm" and showing those in teh dropdown
As we have the same field name to show if the choice is active or not the Field Definition Rules stay the same as in the version 1 of the form.
Giving us the same result in the end
Showing only active choices and serving them from another ConfiForms Form