Advertisement
Guest User

Untitled

a guest
Mar 18th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. $form = $this->createFormBuilder($article)
  2. ->add('title', TextType::class, array('attr' => array('class' => 'form-control')))
  3. ->add('body', TextareaType::class, array(
  4. 'required' => false,
  5. 'attr' => array('class' => 'form-control')
  6. ))
  7. ->add('save', SubmitType::class, array(
  8. 'label' => 'Create',
  9. 'attr' => array('class' => 'btn btn-primary mt-3')
  10. ))->getForm();
  11.  
  12. <div class="container">
  13. {{ form_start(form) }}
  14. {{ form_widget(form) }}
  15. {{ form_end(form) }}
  16. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement