1

In app/code/User/Customdata/Block/Adminhtml/User/Edit/Tab I have create 3 more php file in this tab.

I want to call all file in Main.php file in edit form in Admin. but file is called and data also showing but when we submit form data then only one Main file data post. I want to 2 more files data post with that data. Note: 3 file data coming from 3 different tables.

If i put all in single file then how to setform data

$form->setValues($model->getData());
$form->setValues($models->getData());
$this->setForm($form);

here only last ($form->setValues($models->getData());) data set. but i want to set both these

 $form->setValues($model->getData());


$form->setValues($models->getData());
5
  • You should load each model separately and set values from each model Feb 15, 2019 at 7:15
  • Can you please share how to load each model separately. it's already there.$form->setValues($model->getData()); $form->setValues($models->getData()); $this->setForm($form); Feb 15, 2019 at 7:27
  • show me antities from all your 2 tables and how you get $model variable Feb 15, 2019 at 8:23
  • in layout file I removed extra code <referenceContainer name="content"> <block class="Abc\Customdta\Block\Adminhtml\Abc\Edit" name="customedta_abc_edit"/> <block class="Abc\Customdta\Block\Adminhtml\Abc\Edit\Tab\Maininvestorinfo" name="customedta_abc_edit_tab_maininvestorinfo"/> <block class="Abc\Customdta\Block\Adminhtml\Abc\Edit\Mainfunds" name="customedta_abc_edit_tab_mainfunds"/> <block class="Abc\Customdta\Block\Adminhtml\Abc\Edit\Mainincomes" name="customedta_abc_edit_tab_mainicomes"/> Feb 15, 2019 at 8:41
  • it is for Maininvestorinfo >>> $model = $this->_coreRegistry->registry('expert'); it is for Mainfunds >>> $models = $this->_coreRegistry->registry('funds'); it is for Mainincomes >>> $modelss = $this->_coreRegistry->registry('incomes'); when post form data only Maininvestorinfo is post. I want to 2 more on save buttion Feb 15, 2019 at 8:41

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.