Minimum Checkbox Validaiton

  • 8 August 2016
  • 1 reply
  • 31 views

Is there any existing Javascript validation that requires a least one or a specific number of checkboxes selected before a form can be submitted?


1 reply

Userlevel 7
Badge +3

Hi Daniel, 

I’m don’t believe such a script exists but it should be possible to write one. 

You have a couple of options depending on where these checkboxes are placed in relation to the form’s CTA (ex. at the beginning of the form before other text fields or at the end of the form after some other fields).

Option 1 - You can write a script that listens for N checkboxes being ticked off

Option 2 - You can write a script that pauses the submit button, checks/validates the checkboxes and if everything is OK releases the submit function. If the validation fails, it brings you back to the page and informs you what seems to be the problem. 

You can ping me at: h+support@revise.cc if you need a quote for writing a script like that.

Best,
Hristian

Reply