0
Spring Boot same input for 2 fields(thymeleaf)
In a html is it posible to assign to the same field multiple objects? If yes which is the syntax? Example: <form th:object="${object1}"> <input th:field="${object1.name}"> </form> So for this input if it's posible to assign a second object like: <form th:object="${object1, object2}"> <input th:field="${object1.name, object2.name}"> </form> For me it doesn't work with this syntax"invented" by me
1 Antwort
0
It will be like this:
<form>
<input th:value="${object1.name + object2.name}">
</form>
and the same way to `th:name` and `th:id`.
I don’t know if this works for `th:field`. Just try it out.