Sonata admin, how to read non-displayed field?
I added fields with the option "mapped" => false to the SonataAdmin form.
Now I need to access the values โโof the form fields marked "mapped" => false in the postUpdate method. How can I get them?
+8
Olindo pindaro
source share1 answer
You can simply get the form and data in your admin class. In the postUpdate method:
$fieldData = $this->getForm()->get('name_of_field')->getData(); +12
Petr slavicek
source share