You are viewing limited content. For full access, please sign in.

Question

Question

Checkbox limit choices

asked on January 27

Hello, 

Is there a setting where I can limit the user's input to just 3 choices on a checkbox field.

 

0 0

Answer

SELECTED ANSWER
replied on January 27

No, it would likely require some Javascript or some magic with hidden fields that are using formulas. The easiest way would be to make this 3 separate required radio button fields instead of 1 checkbox field.

1 0
replied on January 28

OK, thanks for the quick response.

0 0
replied on January 28

You could create a field that counts the checkboxes that are checked with this code: 

=IF(Checkbox.Choice_1,1,0)+IF(Checkbox.Choice_2,1,0)+IF(Checkbox.Choice_3,1,0)+IF(Checkbox.Choice_4,1,0)+IF(Checkbox.Choice_5,1,0)

 

Then as soon as that value is greater than 2, the checkbox field is disabled with field rules:

 

 

So the form would look like this before the value is greater than 2:

And as soon as it is 3, the field would be disabled:

And you can hide the how many checkboxes are checked field.

But, if you want people to be able to change their mind, you would need something more that would allow that field to be cleared of all checkboxes.

Replies

replied on January 28

Another way to do it would be to have the number of checkboxes total selected and an error with instructions and if the value of the total selected is greater than 3 the submit button is disabled.

 

3 0
replied on January 28

Thank you, I can use this!

0 0
replied on January 28

You could create a field that counts the checkboxes that are checked with this code: 

=IF(Checkbox.Choice_1,1,0)+IF(Checkbox.Choice_2,1,0)+IF(Checkbox.Choice_3,1,0)+IF(Checkbox.Choice_4,1,0)+IF(Checkbox.Choice_5,1,0)

 

Then as soon as that value is greater than 2, the checkbox field is disabled with field rules:

 

 

So the form would look like this before the value is greater than 2:

And as soon as it is 3, the field would be disabled:

And you can hide the how many checkboxes are checked field.

But, if you want people to be able to change their mind, you would need something more that would allow that field to be cleared of all checkboxes.

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.