Thursday, 5 September 2013

Can I change a Form Class action on build?

Can I change a Form Class action on build?

On a form classe's buildForm method (AbstractType derived) can I set the
action of that form ? What I want to do is similar to the setAction method
that I can use when building an embendded form:
$form = $this->createFormBuilder()
->setAction($this->generateUrl('my_action'))
->add('field', 'text')
->add('button', 'submit');
I mean, is the a setAction equivalent to form classes ?
Thanks, -Nelson

No comments:

Post a Comment