Symfony form.vars.data vs form.vars.value

前端 未结 1 469
粉色の甜心
粉色の甜心 2021-01-12 16:53

A FormView object in Symfony contains several variables, that can be accessed via twig using the public vars property.

Two of those variables are

相关标签:
1条回答
  • 2021-01-12 17:10

    Take for example a DateType field.

    Here, value would be something like the string 2016-06-10. data on the other hand would be a corresponding DateTime-Object.

    When using Text fields, you will not see any difference because in both cases there will be just a string.

    0 讨论(0)
提交回复
热议问题