mercredi 12 juillet 2017

Rails | 2 checkbox in dom not clickable

I have a form in my page and there I have checkboxes.

<div class="col-xs-6 p-l-0">
<input type="checkbox" name="q[group_name_eq_any][]" id="tour" value="Tour"> 
<label for="tour">Tour</label>
</div>

I use this checkbox in both on the page and the bootstrap modal in small devices.

<div class='col-sm-5 col-md-4 col-lg-3 hidden-xs'>
          <%= render 'search_filters' %>
</div>

..
<div class="modal-content modal-main-index">
      <%= render 'search_filters' %>
    </div>
..

Ofcourse because of this, I have 2 checkboxes with the same id. So one of them can not be clicked. What is the best way to solve this. (I do not want to fill modal on button click with js return)




Aucun commentaire:

Enregistrer un commentaire