Ondrej Slinták Ondrej Slinták - 1 year ago 108
PHP Question

How to set default value for form field in Symfony2?

Is there an easy way to set a default value for text form field?

Answer Source

Can be use during the creation easily with :

->add('myfield', 'text', array(
     'label' => 'Field',
     'data' => 'Default value'
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download