I want to create a custom form in frontend and using this form customer can get an appointment.
In my form, I have 4 Fields.
So when a customer fills up this form and does submit I want to insert this data in database and show in the admin section.
How can I achieve this functionality in Magento-2.3
Hello @sekhar_n
Well, I would say its very broad topic to ask because you will require to create a custom module with the combination of Controller,Model,Blocks,Views(templates and phtml files), Setup Scripts etc.
So if you are a beginner i would suggest you to go with beginner guide like how to create a custom module in magento 2 - https://www.mageplaza.com/kb/how-create-hello-world-module-magento-2.html
Otherwise for to achieve you requirement i would suggest you to refer below given links two articles first one is for front controller and form and second one is to get the understanding of model and setup scripts and all.
2) https://bsscommerce.com/confluence/how-to-create-insert-data-into-the-table-in-magento-2/
Hope it helps !
hello @sekhar_n
For achieving your objective you have to basically learn basic concepts of magento 2 module development .
for this you can take help from below links
https://devdocs.magento.com/videos/
https://devdocs.magento.com
https://magento.stackexchange.com
If my answer is useful, please Accept as Solution & give Kudos
Manthan,
I am new to Magento. i followed the Link 1 https://magento.stackexchange.com/questions/222423/how-to-create-a-form-and-save-that-data-in-databa...
But i am getting error if i run the php bin/magento setup:upgrade
There are no commands defined in the "setup" namespace.
Hello @sekhar_n
Are you running this command from the root directory of Magento ?
Seems like you have coding issue, due to that bin/magento not working.
As you mentioned you are new to Magento, I would say try with Hello World module first and then jump to this frontend form module so you will get the basic require module files idea.
May be you can try this - https://inchoo.net/magento-2/how-to-create-a-basic-module-in-magento-2/
Hope it helps !
Dear Manthan,
I have created the module successfully but i am getting 404 Error.
I followed the below link.