Skip to content

Instantly share code, notes, and snippets.

@mops1k
Created March 10, 2015 09:31
Show Gist options
  • Save mops1k/0d421e1b86262f9ac3e1 to your computer and use it in GitHub Desktop.
Save mops1k/0d421e1b86262f9ac3e1 to your computer and use it in GitHub Desktop.
public function setFooAction(Request $request){
$form = $this->createForm();//get the form class, etc...
$json_data = json_decode($request->getContent(),true);//get the response data as array
$form->bind($json_data); //Bind data to Form
if ($form->isValid()) {
...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment