-1

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>

1 Answers1

0

The answer to your question is provided in this post: https://stackoverflow.com/a/72300493/15730570

The answer is for simple checkbox which passes one value back to controller. To pass multiple values, you will need to to tweak your thymeleaf code accordingly.