The th:field
attribute overrides content of name
and value
attributes. The decisionForm
object seems to have empty fields so all forms have empty values.
Basically using th:object
with th:field
is convenient when you need to have your form prepopulated with values. It establishes initial state of your form, not the target. Using them makes sense for single form, not for multiple forms in loop with varying values.
In your case it seems most reasonable to drop: please remove both th:object
and th:field
attributes. Instead use value=1value="1"
or value=2value="2"
for decision
input, and th:value=$value="${applicationOpen.id}"
for application_id
input.