skip to content

Error in multipart forms in Symfony

About a very annoying error in Symfony 1.4 with form bind

When $form->bind() throws this error:

This form is multipart, which means you need to supply a files array as the bind() method second argument.

It means that at least one field in the form is multipart. That means that the form contains files. That’s why bind needs a second argument, usually with the form $request->getFiles($form->getName());

    $this->form->bind($request->getParameter($this->form->getName()), $request->getFiles($this->form->getName()));