如何在表单编辑中定义文本区域内容 (Symfony2/TWIG)
How define textarea content on form edit (Symfony2/TWIG)
我想在我的 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) }}
但我从未测试过。
我想在我的 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) }}
但我从未测试过。