Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

In this tutorial you will learn how to create a form with ConfiForms which will have:

  • fields with custom validation rules based on the selected value in other field

We will validate the value as email number when "EmailNumbers only" is selected and we will validate the same field as required 's value to contain "letters only" when "AddressLetters only" is selected in the dropdown

Excerpt Include
Creating a simple form in Confluence with ConfiForms
Creating a simple form in Confluence with ConfiForms
nopaneltrue

 

This is how the form looks like:

...

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. See screenshots belowImportant 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

...