Thursday, 15 April 2010

php - Set field default options in Symfony2 -



php - Set field default options in Symfony2 -

in php-project uses symfony2 framework, i'm using symfony2 form-component. within formtype-class adding text field instance this:

$options = array('error_bubbling' => true, 'required' => false); $builder->add('username', 'text', $options);

now default text field types have alternative "error_bubbling" set false, , "required" set true. because set error_bubbling true , required false, alter default options of field types. how can accomplish this?

by implementing own field types. there no way influence symfony's standard field types.

php symfony2 symfony-forms

No comments:

Post a Comment