I am new to Symfony, and Im wondering whether there is a build in way to show a not editable input field within a form.(not hidden, not editable, so it just appears in a box)
I am using echo_field
and doctrine model.
Just set the read_only attribute to true when you make the form.
$builder->add('dueDate', 'text', array('read_only' => true));
http://symfony.com/doc/master/reference/forms/types/text.html#read-only
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