getRequest()); $response=null; try { $vform = $this->validateForm($form); $data = $vform->get('freeshipping')->getData(); $save = new ColissimoFreeshipping(); $save->setActive(!empty($data))->save(); $response = Response::create(''); } catch (\Exception $e) { $response = JsonResponse::create(array("error"=>$e->getMessage()), 500); } return $response; } }