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


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


  • You should load each model separately and set values from each model – Serhii Havrylchuk Feb 15 '19 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); – Hansraj Systematix Feb 15 '19 at 7:27
  • show me antities from all your 2 tables and how you get $model variable – Serhii Havrylchuk Feb 15 '19 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"/> – Hansraj Systematix Feb 15 '19 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 – Hansraj Systematix Feb 15 '19 at 8:41

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.