iallow to display labek and attribute into form_field block

This commit is contained in:
Manuel Raynaud
2013-06-25 11:32:53 +02:00
parent 2fb6ec2a7d
commit 3d7262b3ea
3 changed files with 18 additions and 4 deletions

View File

@@ -32,7 +32,13 @@ class CustomerCreation extends AbstractType
public function buildForm(FormBuilderInterface $builder, array $options)
{
return $builder->add("name", "text")
->add("email", "email")
->add("email", "email", array(
"attr" => array(
"class" => "field"
),
"label" => "toto"
)
)
->add('age', 'integer');
}