1

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:

  1. overriding \Magento\Customer\Model\Customer\DataProvider
  2. modifying meta of said form $this->meta = $this->modifyMeta($this->meta);
  3. 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.