Checkboxes as required field

Hi friends,

I am building a form that has a field that collects the “spoken languages” of applicant. User must choose at least one language from the list. May I know how can I validate this field to ensure user choose at least one option?

I tried creating a text label to keep track how many checkboxes are checked and set certain conditions on the “submit” button to only enable the button if “text_language > 0”.

I tried debugging and realised that bubble doesn’t extract the value stored in text label. Hence, I can never fulfil the condition stated above.

You can do it using custom states. Create a custom state in any element using the type number and default value = 0

When the user checks the checkbox , then you set the custom state value as “current value+1”. Otherwise, when it’s already checked, the workflow will be “set the custom state value as current value-1”

In the save button, the workflow will only run if custom state is >0

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.