0

I have created a table using a Controller and Model and in that file show some data.

But i don't know how to save that data in database i have created a table in Magento 2 db. But don't understand how to get those data and save it.

Any help is appriciated.

When i click on send it reload the page and in network it goes to 302 Found.

asked Aug 24, 2020 at 18:56
13
  • Please share some more details like the table name what are the fields and the code snippets where it would be easy to understand your problem and clear it soon. Commented Aug 25, 2020 at 6:04
  • I have updated my question hope it helps will you please suggest me anything @Rising Commented Aug 25, 2020 at 6:07
  • try this link magento.stackexchange.com/a/310465/82670 Commented Aug 25, 2020 at 6:12
  • here i added sample module you can check it. i hope this helps you. magento.stackexchange.com/a/317429/82670 Commented Aug 25, 2020 at 6:13
  • I am not using Admin Grid for my module is it necessary to use it i have just a simple form in that a table to show the data @Msquare Commented Aug 25, 2020 at 6:15

1 Answer 1

0

the method you are using is incorrect. Magento 2 provides the UI components for your needs. Here are some examples on how to implement a custom table backend grid and how to save it.

docs: https://devdocs.magento.com/guides/v2.4/ui_comp_guide/howto/new_component_declaration.html

example:

https://webkul.com/blog/create-collection-grid-editadd-grid-row-installer-magento2/

Cheers

answered Aug 25, 2020 at 9:57

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.