How to set thymeleaf th:field value from other variable

后端 未结 5 1533
心在旅途
心在旅途 2020-12-04 14:24

I have a simple text input field where i have to set default value from one object and save its final value in other. The following code is not working.

<         


        
5条回答
  •  遥遥无期
    2020-12-04 15:03

    So what you need to do is replace th:field with th:name and add th:value, th:value will have the value of the variable you're passing across.

提交回复
热议问题