dimanche 1 mars 2015

html/bootstrap - checkbox and radio in the one input-group

What I'm trying to do is make it so that you can either select option 1 OR any number of the other options. So option 1 should be "radio" and the others should be normal "checkboxes".


My code:



<div class="input-group">
<label>Presentation:</label>
<input type="radio" name="presentation" id="presentation-0" value="correct">
Option 1
<input type="checkbox" name="presentation" id="presentation-1" value="Incorrect1">
Option 2
<input type="checkbox" name="presentation" id="presentation-2" value="Incorrect2">
Option 3
<input type="checkbox" name="presentation" id="presentation-3" value="Incorrect3">
Option 4
</div>


If I do it like this, you can still select Option 1 at the same time as the other options though. Anyone know how I can get the desired result? (so option 1 becomes unselected when you select another option / options 2-4 get unselected when you select option 1)





Aucun commentaire:

Enregistrer un commentaire