Cognito-forms – Show a field based upon checkbox

cognito-forms

Could someone tell me how to show a field based upon selections in a previous field that uses checkboxes?

Best Answer

I am a developer for Cognito Forms.

While you cannot specify this conditional logic in our Basic Editor (yet), you can just switch over to the advanced editor and enter a calculation like the following:

=ListOfChoices.Contains("Choice One")

In this case, ListOfChoices is the name of the Choice field of type Checkboxes, and "Choice One" is one of the values in the list. You could then do other things like:

=ListOfChoices.Contains("Choice One") and ListOfChoices.Contains("Choice Three")

or

=ListOfChoices.Count() > 2

In the future when we add support for this in the Basic Editor, these calculations will automatically open in this editor, as it is just an alternative visual way of entering conditional logic calculations.