DucDigital
DucDigital

Reputation: 4622

Additional form in Symfony Admin Generator Form

I am currently working on a model that has tags.

For tags, I need an additional Form, but everything generated by the form generator is wrapped inside <form> tag.

How can I put an additional form into my current form generated by Symfony form generator?

Thank you

Upvotes: 0

Views: 432

Answers (2)

CamelBlues
CamelBlues

Reputation: 3774

In the configure() method for your form class, you can embed additional forms.

in /lib/form/myForm.class.php:

    public function configure()
    {
      $other_form = new OtherForm();
      $this->embedForm('Other Form', $other_form);
    }

Upvotes: 0

ejosvp
ejosvp

Reputation: 36

make a new form class and set in

config:
  form:
    class: xxxxxx

xxxxx = the name from your new Form Class.

more info in: http://www.symfony-project.org/reference/1_4/en/06-Admin-Generator#chapter_06_form

Upvotes: 1

Related Questions