'How to make a checkbox appear checked in thymeleaf?
I am trying to get a checkbox checked if the object I send in the model has a particular attribute set to true (in this case mentor).
<label th:text="Mentor">Mentor </label>:<span th:text="${useraux.mentor}"/>
<input type="checkbox" th:checked="${useraux.mentor}" th:field="${useraux.mentor}" ng-model="mentor"></input>
I know it is true, because it gives me this output.
But it does not activate the checkbox, I have tried many ways and I am not able to get it checked.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
