Is it possible to connect conditional fields with logical AND?
Conditional fields with logical AND
This option does not exist in Visforms as a simple configuration.
The effort required to implement this well and safely would be unreasonably high.
At least inappropriate for a generic form generator.
The focus of a generic form generator is simply not on generating complex and extensive field logic.
This feature would be complex to implement and anything but trivial to implement and test:
- A clear and understandable representation of the setting options for the logical dependencies would have to be found and implemented for the field configuration.
- The evaluation of the setting options for the logical dependencies must be implemented for the form display in the front end.
- When saving a field, it must be ensured by appropriate checking of the specific configuration that there are no logical stalemate situations with respect to all other fields.
Even then, only one level would be practically possible
And with this great effort, only a single level of logical AND operation would be implemented. Logical connections that span several levels or longer logic chains, either with “AND” or “OR”, would not be possible. And there will always be users for whom this option is not sufficient.
We therefore decided on a different solution.
Implement fields with logical AND with the Visforms web assets
In principle, this requirement can be easily implemented with more or less individual JavaScript code.
So depending on the complexity of the requirement.
And with it any logic, no matter how complicated and convoluted.
Note: We already have another feature in Visforms that fits this.
With the Plugin Visforms - Frontend Webassets of the Visforms Subscription you can easily create JavaScript code and CSS rules in the form configuration.
Note: We already have a practical example with suitable JavaScript code.
More about this in: Conditional fields with logical AND.