Jump to content

Handle post data in custom CMS form


Recommended Posts

Hi all,

following some tutorials and reading documentation I'm now able to display a custom form in some CMS page.

 

Now i have to post the data and, for example, store the input data, send mail, etc.

 

How can i do this?

 

Untill now I've created a custom module with no controller, only my module and some javascript;

putting

return $this->display(__FILE__, 'formdietologo.tpl');

in my custom hook for CMS.

 

My questions are basically two:

1) what is the action parameter of my form?

2) how can I handle all my post data?

 

Thank you!!

Link to comment
Share on other sites

Hi,

 

You can create new controller to handle all your post data. Your form action is the controller.

You can see the post to create new controller: https://www.prestashop.com/forums/topic/331907-how-to-create-a-custom-page-in-16/

 

If it hard for you. You can purchase a module to make your form. Example the Form builder Pro module: https://www.prestashop.com/forums/topic/331907-how-to-create-a-custom-page-in-16/

The module allows you add any kind of fields (text, checkbox, select, file, color...). You can save submitted data for database and send to your email. 

THe module allows you to add your form to CMS page by shortcode.

 

Good luck!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...