0

I have html code:

<input type="checkbox" name="true[1][]" value="1">
<input type="checkbox" name="true[1][]" value="2">
<input type="checkbox" name="true[1][]" value="3">

...

<input type="checkbox" name="true[2][]" value="1">
<input type="checkbox" name="true[2][]" value="2">
<input type="checkbox" name="true[2][]" value="3">

...

How can I set minimum one required for checkboxes with same name? For example: minimum one required for group true[1][], minumum one required for group true[2][].

It should be without JS =) Only HTML.

larrydalmeida
  • 1,570
  • 3
  • 16
  • 31
Bohdan Vorona
  • 685
  • 1
  • 13
  • 26
  • 2
    I think this post answers the same questions , phrased differently, http://stackoverflow.com/questions/6218494/using-the-html5-required-attribute-for-a-group-of-checkboxes . Hope it helps. – IrishGeek82 Jun 11 '14 at 06:44
  • [http://stackoverflow.com/questions/3035634/jquery-validate-check-at-least-one-checkbox](http://stackoverflow.com/questions/3035634/jquery-validate-check-at-least-one-checkbox) see this @Bohdan – Prashant Jun 11 '14 at 06:45
  • @Prashant123 I wrote: It should be without JS... – Bohdan Vorona Jun 11 '14 at 06:47
  • can you check more than one? if not use radio buttons – matpol Jun 11 '14 at 07:15
  • Without using JS this would be easiest to achieve server side on POST. Are you using a server side language? – misterManSam Jun 11 '14 at 07:15

0 Answers0