Skip to content

Instantly share code, notes, and snippets.



Created Nov 29, 2012
What would you like to do?
Set form values after bind
class FormType extends AbstractType
// ....
public function buildForm(FormBuilderInterface $builder, array $options)
->addEventListener(FormEvents::POST_BIND, array($this, 'postBind'));
public function postBind(FormEvent $e)
//data is ur entity object here
$data = $e->getForm()->getData();
// ....
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.