Friday 15 March 2013

How to change default name in form Symfony2 -



How to change default name in form Symfony2 -

i have builder @ formtype class:

$builder ->add('fktblsources', 'entity', array( 'class' => 'blablabundle:tblsources', 'property' => 'name', )) ->add('save', 'submit');`

this form shows "fktblsources" name of row. need set name because field name of entity "tblticket" want create form.

how can alter name?

ok, it's easy, sorry.

name of field changed 'label' option.

->add('fktblsources', 'entity', array( 'class' => 'blablabundle:tblsources', 'property' => 'name', 'label' => 'name field here' ))

forms symfony2

No comments:

Post a Comment