I am creating forms with an unmapped field as explained in the form documentation.
However when in the controller or similar I want to access it, currently I am using the POST request array and getting out from there like so:
$postData = $this->getRequest()->request->get('my_form_name'); $unmappedField = $postData['unmapped_field']
I just can't help but thinking this is not the best way, and I cannot find anything on the official documentation.
Is there a better way than this?
You can access unmapped field in form
$unmappedField = $form['unmapped_field']->getData();
2.1m questions
2.1m answers
60 comments
56.9k users