8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6cd0063 commit 2d82707Copy full SHA for 2d82707
forms.rst
@@ -686,7 +686,8 @@ the choice is ultimately up to you.
686
{
68 C657 7
687
$builder
688
->add('task')
689
- ->add('dueDate', null, array('mapped' => false))
+ ->add('dueDate')
690
+ ->add('agreeTerms', 'checkbox', array('mapped' => false))
691
->add('save', 'submit')
692
;
693
}
@@ -696,11 +697,11 @@ the choice is ultimately up to you.
696
697
698
The field data can be accessed in a controller with::
699
- $form->get('dueDate')->getData();
700
+ $form->get('agreeTerms')->getData();
701
702
In addition, the data of an unmapped field can also be modified directly::
703
- $form->get('dueDate')->setData(new \DateTime());
704
+ $form->get('agreeTerms')->setData(true);
705
706
Final Thoughts
707
--------------
0 commit comments