thymeleaf: th:value is ignored when using th:field

后端 未结 3 991
一个人的身影
一个人的身影 2021-02-04 11:52

I\'ve got a form where I want to edit some user data. So the already stored data is put as th:value and after sending I validate with spring validation and want to give back the

3条回答
  •  攒了一身酷
    2021-02-04 12:42

    Because Attribute th:field is Combination of both th:name and th:value So, either use this:

    
    

    Or this:

    
    

提交回复
热议问题