cancel
Showing results for 
Search instead for 
Did you mean: 

I want to create a custom form in frontend and using this form customer can get an appointment

I want to create a custom form in frontend and using this form customer can get an appointment

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.

  1. First Name (text filed)
  2. Email (text filed)
  3. Phone No. (numeric field)
  4. Booking a time (with date time calendar)

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

5 REPLIES 5

Re: I want to create a custom form in frontend and using this form customer can get an appointment

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.

 

1)  https://magento.stackexchange.com/questions/222423/how-to-create-a-form-and-save-that-data-in-databa...

 

2) https://bsscommerce.com/confluence/how-to-create-insert-data-into-the-table-in-magento-2/

 

Hope it helps !

if issue solved,Click Kudos & Accept as Solution

Re: I want to create a custom form in frontend and using this form customer can get an appointment

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

Re: I want to create a custom form in frontend and using this form customer can get an appointment

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.

Capture.JPGCapture1.JPG

Re: I want to create a custom form in frontend and using this form customer can get an appointment

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 !

if issue solved,Click Kudos & Accept as Solution

Re: I want to create a custom form in frontend and using this form customer can get an appointment

Dear Manthan,

I have created the module successfully but i am getting 404 Error.

I followed the below link.

https://magento.stackexchange.com/questions/222423/how-to-create-a-form-and-save-that-data-in-databa...404error.JPG