I added fields with the option "mapped" => false
to a SonataAdmin form.
Now I need to access the values of the form fields marked with "mapped" => false
in the method postUpdate
. How can I retrieve them?
You can simply get Form and filed data in your admin class. In method postUpdate:
$fieldData = $this->getForm()->get('name_of_field')->getData();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.