When I submitted the form with the smyfony4 app, I got the following error.
Since it is an error of the entire form, it is not possible to identify the cause.
I want to debug the value of the submitted form.
What should I do?
I'm sorry for the question like a beginner.
Error
shop => Not a valid value.
<div class='formGroup'> </div> . . .
$form = $this->createForm(ShopType::class, $shop, array( "method" => "PUT", "action" => $this->generateUrl("app_shop_shop_update"), "em" => $this->getDoctrine()->getManager(), )); if ($request->isMethod('PUT')) { if ($form->handleRequest($request)->isValid()) { // save $this->get("admin.shopService")->save($shop); $this->get('session')->getFlashBag()->add('success', 'I saved my shop profile.'); return $this->redirect($this->generateUrl('ahi_sp_admin_shop_shop_edit')); } else { $this->get('session')->getFlashBag()->add('error', 'The shop profile could not be saved. Please check the input contents.'); } }
https://stackoverflow.com/questions/66886113/symfony-how-to-check-the-data-sent-by-form March 31, 2021 at 06:34PM
没有评论:
发表评论