How to Write Conditions for Elements and Fields

Anne Ramey
Form Developers

Conditions are an important way of getting the desired behavior out of your form, appearing as part of display and validation.



When the conditions evaluate to true the item is either visible or required, etc. These conditions are basically what would go in the if part of a javascript if statement.


The conditional has a menu for including values from the fields, form, identity (logged in user's identity when the form is rendered), kapp, etc. This, combined with javascript operators and text can let you write desired conditionals.

For example, if you have a radio button called "Environment" and only want a section to show up if the value is "Production", you could put the following conditional for visibility on that section: values('Environment') == "Production" And you would select Environment from the Values section in the variables menu to get the values('Enviroment') portion of the statement.

Javascript logical operators you may need are:

  • equal: ==
  • not equal: !=
  • and: &&
  • or: ||