<form>
<label for="cPendrive"><input type="checkbox" name="wyposazenie[]" value="Pendrive" id="cPendrive"/><span>Pendrive</span></label>
</form>
<form>
<label for="cPendrive"><input type="checkbox" name="wyposazenie[]" value="Pendrive" id="cPendrive"/><span>Pendrive</span></label>
</form>
<form>
<label for="cPendrive"><input type="checkbox" name="wyposazenie[]" value="Pendrive" id="cPendrive"/><span>Pendrive</span></label>
</form>
<form>
<label for="cPendrive"><input type="checkbox" name="wyposazenie[]" value="Pendrive" id="cPendrive"/><span>Pendrive</span></label>
</form>
<form>
<label for="cPendrive"><input type="checkbox" name="wyposazenie[]" value="Pendrive" id="cPendrive"/><span>Pendrive</span></label>
</form>
<form>
<label for="cPendrive"><input type="checkbox" name="wyposazenie[]" value="Pendrive" id="cPendrive"/><span>Pendrive</span></label>
</form>
<form>
<label for="cPendrive"><input type="checkbox" name="wyposazenie[]" value="Pendrive" id="cPendrive"/><span>Pendrive</span></label>
</form>
I have problem, then press anything checbox/label always is selected only first checkbox, not checkbox inside form.
Where is problem?
I would like not use javascript and generate random names for atrribute 'for' and 'id'.
forattribute of a label keys off theid.