I have created an admin grid and also created an associated form for that grid. And then I have created a table for that grid. Now, how to save the form data that particular grid DB table


2 Answers 2


You have to make a model corresponding to the table, from which you will be able to do all db related stuff.
Following is a good tutorial on how to make model ; https://www.mageplaza.com/magento-2-module-development/how-to-create-crud-model-magento-2.html


You can create a controller into adminhtml folder and create one model to get table in which you want to save that data Create model factory in your controller and get form data over there using post method and set that data in controller

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.