I found here a way to do a direct passing of data (magento 1) but what if the first controller serves a BO form and then the other controller gets the data, kinda like edit
and save
of customer module.
I'm currently trying this approche:
- overriding
\Magento\Customer\Model\Customer\DataProvider
- modifying meta of said form
$this->meta = $this->modifyMeta($this->meta);
in
modifyMeta()
do this://adding my field to be processed in the save controller (BO) $meta['customer']['children']['my_field']['arguments']['data']['config'] = [ 'formElement' => 'input', 'componentType' => 'field', 'visible' => '0', 'value' => 'my value' ];
But in the processing controller, the param is not retrieved with $this->getRequest()->getParam('my_field')
(I get a big fat NULL)
if there's maybe a better way, please advise.