dimanche 15 mai 2022

How do I get the values of all the selected check box from thymeleaf in spring boot

Data is being populated from database

<div th:each="comm : ${listBothComm}">
     <label class="list-group-item d-flex gap-2"> <input
         checked="" class="form-check-input flex-shrink-0"
         th:field="*{comm_cd}" th:value="${comm.comm_cd}" type="checkbox"><span
         th:text="${comm.comm_nm}"> </span>
      </label>
</div>



Aucun commentaire:

Enregistrer un commentaire