We’re utilizing forms to craft a survey, empowering us to stay connected with our users throughout their product journey. Within this survey, we’ve incorporated a checkbox question type. Our aim is to restrict the number of checkboxes a user can select. For instance, out of five checkbox options, we’d like to cap their selection at a maximum of three. Is it possible to implement this functionality?
Same question here.
I agree that having validation rules for Multiple Checkbox properties would be useful.
Currently, validation rules are only presented for properties that are custom text or custom number properties, plus a handful of Hubspot default properties. You can read more about them here: Set validation rules for a property
It’s possible you could jury-rig a validation system for multiple checkboxes, but it would be complicated. To do it flawlessly, you would probably need:
- For each property, a script that rejects form submissions with too many options selected, and returns some sort of error for the end user.
- For each property, a script or automation that considers what to do in cases where data is submitted outside of a point-and-click form (eg. through the API; or if end-users use the browser inspection tool to bypass your rules)
- For each property, a Hubspot workflow that counts the number of selections, and decides what to do if too many have been chosen.
I’m currently migrating a form from Typeform to the new Hubspot forms editor, and have come up against the same issue. The Hubspot forms editor does let you input some logic to try to control this, but by a quick count, for a property with 6 options, to allow for a max of 2 selections, you would need 20 form rules (to reject submissions with any of the possible selections of 3 or more: options 1/2/3, 1/2/4, 1/2/5, 1/2/6, 1/3/4, 1/3/5, 1/3/6, 1/4/5, 1/4/6, 1/5/6, 2/3/4, 2/3/5, 2/3/6, 2/4/5, 2/4/6, 2/5/6, 3/4/5, 3/4/6, 3/5/6, 4/5/6) — and even then, the most the forms editor would currently let you do is “hide the other questions”; so if a user went backwards through your form after completing other required fields, they could get around the limitation.
For my purposes, it doesn’t really matter — I’ll simply encourage my users not to pick too many options, because it doesn’t benefit them. But it’s still a bit of a sloppy UX. I’d love to see this change implemented.