Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How define textarea content on form edit (Symfony2/TWIG)

I want to display a specific content in my editForm textarea so I try like text field but it doesn't work :

{{ form_widget(edit_form.description, { 'attr': {'value': 'content'} }) }} {{ form_errors(edit_form.description) }}

How can I do it in TWIG ?

like image 554
Antoine Subit Avatar asked Mar 17 '23 22:03

Antoine Subit


1 Answers

This should work according to the doc.

{{ form_widget(edit_form.description, { 'value': 'content'}) }} {{ form_errors(edit_form.description) }}

But I've never tested it.

like image 115
Tom Tom Avatar answered Apr 01 '23 15:04

Tom Tom