Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $form = $this->createFormBuilder();
- $registration = $this->get('form.factory')->createNamedBuilder('registration');
- $questionary = $this->get('form.factory')->createNamedBuilder('questionary');
- $registration
- ->add('name', 'text')
- ->add('city', 'text')
- ;
- $questionary
- ->add('question_1', 'text')
- ->add('question_2', 'choice', array(
- 'choices' => array('female', 'male')
- ))
- ;
- $form->add($registration);
- $form->add($questionary);
- ?>
- {{ form_row(form.registration) }}
- {{ form_row(form.questionary) }}
- <?
- $data = $form->getData();
- $registration = $data['registration'];
- $questionary = $data['questionary'];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement