How to Add a Form to Your PrestaShop Website

November 12, 2024

PrestaShop is a free shopping cart platform that helps small to large businesses build and run a successful online store. They’re committed to providing the best shopping cart experience for merchants and customers.

If you have a PrestaShop website and want to embed your form to a page, follow the steps below.

Allowing Iframes on HTML Fields

By default, PrestaShop does not allow iframes in page content or product descriptions. To enable iframe support, make this change in your PrestaShop dashboard with just a few clicks:

  1. In the PrestaShop Dashboard, expand the Shop Parameters menu on the left of the page and click on General.
  2. On the right, toggle the Allow iframes on HTML fields setting to the Yes position.
  3. Then, click on the Save button at the bottom to apply the changes.
Allow iframes on HTML fields setting in PrestaShop Dashboard

Getting and Modifying the Embed Code

Follow these steps to copy the embed code for your PrestaShop website:

  1. In Form Builder, click on Publish.
  2. Next, click on Platforms.
Platforms tab of Form Builder Publish tab in Jotform
  1. Then, select PrestaShop. You can use the search bar to find it easily.
PrestaShop publish option in Platforms tab of Form Builder in Jotform
  1. In the next screen, click on Copy Code.
PrestaShop Copy Code button in Platforms tab of Form Builder in Jotform
  1. In the embed code, find onload="window.parent.scrollTo(0,0)" and delete it. Then, remove any <script> sections that appear after the closing </iframe> tag. The updated code should look like this:
<iframe id="JotFormIFrame-201706063937051" title="Product Feedback Form" allowtransparency="true" allowfullscreen="true" allow="geolocation; microphone; camera" src="https://form.jotform.com/201706063937051" frameborder="0" style="min-width: 100%; height:539px; border:none;" scrolling="no">
</iframe>

Note

Adjust the value of the height property in the iframe embed code from 539px to match your form’s actual height.

Embedding the Form

Follow these steps to embed your form on your PrestaShop website:

  1. In PrestaShop Dashboard, expand the Design menu on the left of the page.
  2. Then, click on the Pages option.
  3. In the Pages section, click the Pencil icon under the Actions column of the table below to embed your form on an existing page. To create a new page, click the Add new page button at the top.
Add new page button on the Pages section of the PrestaShop Dashboard
  1. Next, click on Source code on the Page content toolbar.
Page content setting of the Pages section in PrestaShop Dashboard
  1. In the Source code window, paste your modified form embed code and click on Ok.
  2. At the bottom of the Pages section, click on the Save and Preview or Save button to apply the changes to your website.
    Note: The Save and Preview button will open the preview of your page with your form on a new browser tab.
Form embed code in Page content Source code window in PrestaShop Dashboard

Note

We have installed and used PrestaShop version 1.7.8.5 for the above steps and screenshots.

Do you have any questions, suggestions, or feedback? Please leave a comment below. You can also reach us for your inquiries by creating a support ticket.

Contact Support:

Our customer support team is available 24/7 and our average response time is between one to two hours.
Our team can be contacted via:

Support Forum: https://www.jotform.com/answers/

Contact Jotform Support: https://www.jotform.com/contact/

Send Comment:

Jotform Avatar
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Comments:

  • Antonio Ponce - Profile picture