@@ -654,6 +654,7 @@ guess from the validation rules that both the ``task`` field is a normal
654
654
$form = $this->createFormBuilder($task)
655
655
->add('task')
656
656
->add('dueDate', null, array('widget' => 'single_text'))
657
+ ->add('save', 'submit')
657
658
->getForm();
658
659
}
659
660
@@ -918,6 +919,7 @@ ways. If you build your form in the controller, you can use ``setAction()`` and
918
919
->setMethod('GET')
919
920
->add('task', 'text')
920
921
->add('dueDate', 'date')
922
+ ->add('save', 'submit')
921
923
->getForm();
922
924
923
925
.. note ::
@@ -991,8 +993,9 @@ that will house the logic for building the task form::
991
993
{
992
994
public function buildForm(FormBuilderInterface $builder, array $options)
993
995
{
994
- $builder->add('task');
995
- $builder->add('dueDate', null, array('widget' => 'single_text'));
996
+ $builder->add('task')
997
+ ->add('dueDate', null, array('widget' => 'single_text'))
998
+ ->add('save', 'submit');
996
999
}
997
1000
998
1001
public function getName()
@@ -1057,8 +1060,9 @@ the choice is ultimately up to you.
1057
1060
1058
1061
public function buildForm(FormBuilderInterface $builder, array $options)
1059
1062
{
1060
- $builder->add('task');
1061
- $builder->add('dueDate', null, array('mapped' => false));
1063
+ $builder->add('task')
1064
+ ->add('dueDate', null, array('mapped' => false))
1065
+ ->add('save', 'submit');
1062
1066
}
1063
1067
1064
1068
Additionally, if there are any fields on the form that aren't included in
@@ -1731,6 +1735,7 @@ an array of the submitted data. This is actually really easy::
1731
1735
->add('name', 'text')
1732
1736
->add('email', 'email')
1733
1737
->add('message', 'textarea')
1738
+ ->add('send', 'submit')
1734
1739
->getForm();
1735
1740
1736
1741
$form->handleRequest($request);
0 commit comments