Is it possible to set default value of input field in Twig ?
I am rendering form row with:
{{ form_widget(form.title) }}
I want to be able to set default value like:
{{ form_widget(form.title, {data : 'Default title'}) }}
Is it even possible ?
Magic keyword for default value is value
, not data
.
{{ form_widget(form.title, {'value' : 'Default title'}) }}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With