How to fill object with data from the form before sending to the database?

$formNew->handleRequest($request);

 if ($formNew->is submitted() && $formNew->isValid()) {
 //in this place you need to have to know the data object to check //

 $em = $this->getDoctrine()->getManager();
$em->persist($ob);
$em->flush();
));
 }
June 3rd 19 at 19:03
0 answer

Find more questions by tags Symfony