jeudi 2 juillet 2020

A crazy proble with checknox HTML Bootstrap

I've a problem with input checkbox that let me to be crazy. for first sorry for my bad english, I'm italian. Now explain the problem: I've a page that manage the website. I've a form with text, textarea, select and finally 3 check box (show like switch). In the code below, every things is same, but only second and third checkbox are running (the first no). If I add a new , the first, third and last run but the second no. In this code if I double-click on the first item, show selected third text (no check, see picture under code). The webapp is making with bootstrapt , php and js, but for try I copy and paste the code in a HTML5 without nothing other but it's the same. for now I solve leave only 1° and 2° item, and it's running well, but I would like to know what I was wrong. Thank to all !!

<div class="row " style="max-height: 80px;">
                  
  <div class="col"><!-- switch -->
  <!-- campo nascosto contenente l'icona precedente, serve per eliminare la classe -->
    <input id="lastico" name="lastico" type="hidden" value="fas fa-smoking-ban">
                 
    <!-- contiene subcategorie -->
    <div class="form-group custom-control custom-switch check-box-text py-5">
      <input type="checkbox" class="custom-control-input" id="enableitem" name="enableitem" >
      <label class="custom-control-label" for="enableitem">Rendi attiva la voce</label>                  
    </div>

    <!-- visibilità voce-->
    <div class="form-group custom-control custom-switch check-box-text ml-3">
      <input type="checkbox" class="custom-control-input" id="visible" name="visible" >
      <label class="custom-control-label" for="visible">Rendi visibile la voce </label>                  
    </div><br><br>

    <!-- contiene subcategorie -->
    <div class="form-group custom-control custom-switch check-box-text py-5">
      <input type="checkbox" class="custom-control-input" id="subcategory" name="subcategory" >
      <label class="custom-control-label" for="subcategory">Contenuto diviso in sottocategorie</label>                  
    </div>

</div><!-- end switch -->

enter image description here




Aucun commentaire:

Enregistrer un commentaire