This is the documentation for ConfiForms Server/Data Center app
However, 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 this tutorial you will learn how to create a form with ConfiForms which will have:
We will validate the value as number when "Numbers only" is selected and we will validate the same field's value to contain "letters only" when "Letters only" is selected in the dropdown
If you are new to ConfiForms, please take a few minutes to read the Basic concepts Guide, or go through the video tutorial on that page.
This is how the form looks like:
Complete solution in storage format
Pieces of a puzzle (how it looks like in the Confluence editor)
We have simple form (ConfiForms Form), 2 fields (2 ConfiForms Field definitions), 1 ConfiForms Registration Control and 2 ConfiForms Field Definition Rules macros
Let's see in more details how the "type" field is configured:
It is a dropdown field with 2 choices: numbers (Numbers only) and letters (Letters only)
Next important bit is 2 ConfiForms Field Definition Rules macros and their configurations. Both rules are set to track "val" field and executed based on a condition, meaning based on the selection made in the "type" field. Important bit here is the condition - we filter based on this condition and use an ID for dropdown field (see configuration for "type" field above)
And here is how the form behaves when validation fails
When validation is successful the record is saved into the form storage, otherwise the appropriate error message is shown