Jump to content

How can I CLONE the "contact" form on my site?


TWDesign

Recommended Posts

Thanks to this wonderful post (which deserves to be pinned btw)

 

http://www.prestashop.com/forums/topic/134877-solved-tutorial-custom-contact-page-forms/page__fromsearch__1

 

I now understand how to amend the existing PrestaShop Contact Us form.

 

BUT what if I want another form on my site, for a different purpose.

For example what if I want a form for potential job applicants to fill

in if they are interested in positions in my company?

 

How can I duplicate the contact form onto a different URL that will

allow me to edit and create new fields for this secondary form?

Link to comment
Share on other sites

I guess a custom module solution may work for you.

If you are interested PM me.

 

You need to provide me the job application form fields you want.

Say we can put the form button in multiple hooks like left/right/footer/top columns and that button will direct you to your custom application form and when the form is submitted both you and the applicant will be notified by mail.

Link to comment
Share on other sites

If you want to learn forms then pick an existing form, which is pretty much your entire front office, i.e. smarty, find its controller and child classes and clone it. Change it to fit your needs and then you could create a module for your hack, or not.

 

you might find this link interesting. http://www.prestashop.com/forums/topic/1379[spam-filter]remove-smarty/

 

If only someone would port cforms into PrestaShop (free for wp)..it's dreamy

Link to comment
Share on other sites

If you want to learn forms then pick an existing form, which is pretty much your entire front office, i.e. smarty, find its controller and child classes and clone it. Change it to fit your needs and then you could create a module for your hack, or not.

 

you might find this link interesting. http://www.prestasho...-remove-smarty/

 

If only someone would port cforms into PrestaShop (free for wp)..it's dreamy

 

Woosh. Sorry , you lost me already.

Can you explain it again in practical terms?

 

I'm guessing that the first thing I need to do is copy the

ContactController, contact-form.tpl and contact.html files and rename then as , say;

JobsController, jobs-form.tpl and jobs.html.

 

Then what?

Link to comment
Share on other sites

Woosh. Sorry , you lost me already.

Can you explain it again in practical terms?

 

I'm guessing that the first thing I need to do is copy the

ContactController, contact-form.tpl and contact.html files and rename then as , say;

JobsController, jobs-form.tpl and jobs.html.

 

Then what?

First, I would not pick contact forms unless you also need a database containing the from data...note contacts is very complex and interacts with back office for client communications. So this would require back office tab and class modifications as well.

 

Each informational block of your entire PrestaShop front office is composed of individual smarty templates. in order to choose the correct module to clone, pick the informational block that most closely matches what you want. If it's contacts, suerte!

 

How do you know which block of information is in what module? View the page source nd find the html string, above and below ps compliant modules is the name of the module who built the informational block. This does not work for controllers.

Link to comment
Share on other sites

I need to create a form to send job application data.

I don't care whether the information gets saved in the database or not. It just has to send the data.

 

So the question stands. How do I create a new form on my site?

I ALREADY know how to build the form fields. That's not what I am asking.

 

All I want to know is how to create a NEW form on a NEW url ?

I already have my edited contact form working splendidly.

But I need a secondary form.

Edited by TWDesign (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...

Have a look at Contact Form from Aretmic. I just purchased this module because I was struggling too.

 

Pretty sure that is just what you need...

 

I did buy it.

It's a piece of crap and the developer doesnt answer any emails.

I hope you have better luck with that module than I did.

 

That's why I decided I want to learn how to do it myself.

Edited by TWDesign (see edit history)
Link to comment
Share on other sites

TW,

If you don't care if it gets saved in the database or not, why not write a static form on a static page? That seems like the best solution if you do not need it to access the actual db. You could also do a wordpress installation and just have a form as the only page if you are more comfortable doing it that way.

Link to comment
Share on other sites

TW,

If you don't care if it gets saved in the database or not, why not write a static form on a static page? That seems like the best solution if you do not need it to access the actual db. You could also do a wordpress installation and just have a form as the only page if you are more comfortable doing it that way.

 

Yes, I know those options.

But neither are ideal since I would need to recreate the theme, menus etc.

 

I want it to look like the form is natively part of the actual site.

 

From what I have seen sofar, I guess I need to create a new Controller file (e.g. NewformController.php) and a new Template file (e.g. newform.tpl).

 

Havent had time to investigate much further than that yet.

Link to comment
Share on other sites

  • 4 months later...

I am also trying to make a page with a custom contact form with a simple "application", separate from the default contact form. Did you find something that worked best?

 

Hi Jessica,

 

Have you ever checked our module Job (Employment) Application form?

 

Regards.

 

http://www.megventure.com/16-job-employment-application-form.html

 

or

 

http://addons.prestashop.com/en/administration-tools-prestashop-modules/5842-Job-Employment-Application-Form.html

Link to comment
Share on other sites

  • 1 month later...

How do you do this ? I need to have a php mail form or contact form in my checkout.

 

Just Google PHP mail form to find some sample form code. It is pretty basic/simple code. Just copy the HTML portion of the form into your CMS with the HTML input tab. Upload the PHP form file to your server. Customize the two parts as needed. There is usually some information in tutorials for PHP form mailers in Google search. Hope that helps.

Link to comment
Share on other sites

  • 3 months later...

Just Google PHP mail form to find some sample form code. It is pretty basic/simple code. Just copy the HTML portion of the form into your CMS with the HTML input tab. Upload the PHP form file to your server. Customize the two parts as needed. There is usually some information in tutorials for PHP form mailers in Google search. Hope that helps.

 

Hi,

 

I tried a simple php form and when I hit the submit button, instead of the form submitting to the email, the page (Prestashop) loads the .php form handler as a 404 page instead. Any ideas??? I have my html form code within the cms and linked to the .php that's loaded on the server. I use this exact script on all my client sites and never have an issue except this.

Link to comment
Share on other sites

Hi,

 

I tried a simple php form and when I hit the submit button, instead of the form submitting to the email, the page (Prestashop) loads the .php form handler as a 404 page instead. Any ideas??? I have my html form code within the cms and linked to the .php that's loaded on the server. I use this exact script on all my client sites and never have an issue except this.

 

I fixed it. I had to add a / in front of the form handler url within the html code.

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...