Dynamic contact form by subject

Overview

Dynamic contact form by subject is a PrestaShop module that replaces the native contact form with a fully configurable dynamic form system. Assign a unique form to each contact subject, with its own custom fields, smart display conditions and built-in GDPR compliance.

Whether you run an e-commerce store with a structured customer service, a B2B website requiring detailed quote requests, or an event with online registrations, this module lets you collect exactly the information you need — without any additional development.

Key benefits:

  • A custom form per contact subject, fully independent
  • Smart display conditions that adapt the form in real time
  • Built-in GDPR compliance with a configurable checkbox per form
  • JSON export/import system to deploy your forms across multiple shops
  • Compatible with PrestaShop 1.7, 8.x and 9.x, multi-shop and multilingual

Features

Advanced custom fields

Build tailor-made forms with 6 field types: text, textarea, dropdown, checkbox, file and date. Each field supports advanced validation (email, URL, phone, number, custom regex) and can be set as required or optional. Labels and options are fully multilingual.

Dynamic display conditions

Make your forms smart with display conditions. A field can be shown or hidden based on the value of another field in the same form, with four available operators: equals, not equals, contains and is checked. Fields hidden by a condition are not validated server-side, ensuring a smooth and consistent experience.

Example: a "Billing company" field only appears when the customer checks the "Need an invoice" checkbox.

Customer group restriction

Control precisely who can access each form by restricting visibility per PrestaShop customer group. Ideal for offering dedicated forms to wholesale customers, resellers or any other segment of your clientele.

GDPR compliance

Each form can include a mandatory GDPR consent checkbox with customizable, multilingual text. You can insert HTML to add a link to your privacy policy, ensuring simple and transparent compliance.

Automatic confirmation email

Enable automatic sending of a confirmation email to the customer after each submission. The email text is fully customizable and multilingual, providing professional and reassuring communication.

JSON export and import

Export the complete configuration of a form (fields, conditions, options, multilingual texts) in JSON format. Import it to another shop in one click. Particularly useful for agencies deploying the same configuration across multiple shops, or for backing up your forms before an update.

Back-office preview

Check your form configuration directly from the back office with the preview button. The preview displays all fields, conditions, active native elements (order reference, attachment), the GDPR checkbox and the submit button.

Installation

  1. Download the module ZIP file from your WePresta account
  2. In your PrestaShop back office, go to Modules > Module Manager
  3. Click Upload a module and select the ZIP file
  4. The module configures itself automatically: the native contactform module is disabled, database tables are created, and a Dynamic contact form by subject tab appears in the back-office menu

Note: If the contactform module is manually re-enabled later, a warning will be displayed on the configuration page to alert you of the potential conflict.

Configuration

General settings

Access the global configuration via Modules > Module Manager > Dynamic contact form by subject > Configure. Two main options are available:

  • Debug mode: enables detailed logs in var/logs/wepresta_dynamic_contact_form.log, useful for diagnosing email delivery or validation issues. Disable in production.
  • Submission limit per minute: maximum number of submissions allowed per minute per visitor (default: 3). Protects against spam without requiring a CAPTCHA.

Creating and configuring a form

Creating a form follows three simple steps:

  1. Check your contact subjects in Customer Service > Contact and create new ones if needed
  2. In Dynamic contact form by subject > Forms, click + Add a form and associate it with a subject
  3. Add your custom fields, configure display conditions and GDPR options

Each form has detailed settings: activation, order reference display, attachment, GDPR checkbox with customizable text, confirmation email and customer group restriction.

Multi-shop and multilingual

The module is fully compatible with PrestaShop's multi-shop feature. Each shop can have its own forms with independent configurations. All customer-facing content (labels, options, GDPR text, confirmation email) is multilingual and configurable via the back-office language tabs.

Requirements

  • PrestaShop 1.7, 8.x or 9.x
  • PHP 7.2 or higher
  • The native contactform module must be disabled (the module does this automatically on installation)
  • SSL connection (HTTPS) recommended

FAQ

Does the module completely replace the native contact form?

Yes, the module automatically disables the native contactform module on installation and takes over the entire contact page. Discussion threads are created normally in Customer Service, just as with the native form.

How do display conditions work?

Conditions let you show or hide a field based on the value of another field in the same form. Four operators are available: equals, not equals, contains and is checked. Conditions work on a single level only (a conditional field cannot itself be the parent of another conditional field).

Is the module compatible with my theme?

Yes, the module is compatible with all standard PrestaShop themes. The rendering adapts automatically to your theme. Validation is performed both browser-side (instant checks) and server-side (enhanced security).

How can I deploy the same form across multiple shops?

Use the JSON export/import feature. Export your form from one shop, then import the JSON file on the other shops. The entire configuration (fields, conditions, options, multilingual texts) is preserved.

Is the module secure against spam?

The module includes anti-spam protection through submission rate limiting per minute, CSRF protection via security tokens, and systematic server-side data validation and sanitization. If you wish to add an additional CAPTCHA, you can use a compatible third-party module.

What happens when I uninstall?

Uninstalling removes all module tables and configurations. Remember to export your forms as JSON before uninstalling if you want to keep them. The native contactform module will need to be manually re-enabled.

Support

For any questions or assistance, contact us by email at mail@wepresta.shop. Please include your PrestaShop version, your PHP version, a detailed description of the issue, screenshots if possible, and the log file if debug mode is enabled.

Changelog

Version 1.0.0

  • Initial release
Loading...