我想在我的 editForm textarea 中显示特定内容,所以我尝试使用文本字段,但它不起作用:
{{ form_widget(edit_form.description, { 'attr': {'value': 'content'} }) }} {{ form_errors(edit_form.description) }}
我怎样才能在 TWIG 中做到这一点?
最佳答案
这应该根据 the doc 起作用.
{{ form_widget(edit_form.description, { 'value': 'content'}) }} {{ form_errors(edit_form.description) }}
但我从来没有测试过。
关于forms - 如何在表单编辑中定义 textarea 内容 (Symfony2/TWIG),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28693540/