Modern Storefront Form
Vanilla JavaScript AJAX submission, zero jQuery, zero page reload, native Luma speed
Replaces the default Magento 2 contact form at /contact with an AJAX form that saves every message to an admin grid. A honeypot, a 2 second time trap and a cap of 5 posts per IP per hour block spam.
Key Features:
Additional Services
Built-in from day one. No add-ons, no upsell, no licence keys to renew.
Vanilla JavaScript AJAX submission, zero jQuery, zero page reload, native Luma speed
7 field types, text, textarea, select, radio, checkbox, email, tel
Honeypot field, hidden input invisible to users but filled by bots
Dedicated submission grid, view all contact submissions under Panth Extensions → Contact Submissions
Admin notification email, sent to configurable recipient on every submission
MEQP compliant, passes Adobe's Magento Extension Quality Program
The Advanced Contact Form for Magento 2 replaces the default /contact page with an AJAX form that stores every submission in an admin grid. Each message gets a New, Read or Replied status, and spam is filtered without a CAPTCHA by a hidden honeypot field, a 2 second time check and a limit of 5 submissions per IP per hour.
Merchants get unlimited custom fields across seven types (text, textarea, select, radio, checkbox, email, tel) stored as JSON per submission. Three independent spam defences - honeypot, time-based trap with configurable minimum fill time, and per-IP rate limiting (default five per hour) - stop bots without forcing real customers through CAPTCHAs. A three-state status workflow (New orange / Read blue / Replied green) keeps your team organized, with auto-mark-as-read on open, bulk actions, and customer-aware Reply-To headers for one-click email replies.
The Advanced Contact Form for Magento 2 ships a clean contact-info sidebar (email, phone, address, business hours), logged-in customer pre-fill, customizable admin and customer email templates, MEQP compliance, CSRF protection, XSS-safe rendering, and SQL-injection-safe repository patterns. Tested across Magento 2.4.4 - 2.4.8 and PHP 8.1 - 8.4 on stock Luma and any Luma child theme.
Best for:
The Advanced Contact Form for Magento 2 gives you a contact page that actually converts:
Panth Advanced Contact Us replaces the stock Magento 2 contact page at /contact with its own form, controller and layout. The form is submitted with plain JavaScript over AJAX, every accepted submission is written to a database table, and the store owner gets an email notification with an optional confirmation email to the sender. Merchants can add extra form fields from the admin configuration, show a contact-details sidebar, and screen submissions with a honeypot field, a content check, a minimum fill time and a per-IP rate limit. Submissions are managed in an admin grid under "Panth Extensions".
The module takes over the contact frontend route ahead of Magento_Contact. While "Enable Module" is Yes it removes the default contact form blocks from the contact page and renders its own block instead. It is written for Luma and Luma-based themes; the template uses inline CSS and vanilla JavaScript (no Alpine.js, Tailwind or jQuery) and its layout update also removes the Hyva contact page blocks, so it renders on Hyva storefronts as a self-styled page.
Product page: kishansavaliya.com/magento-2-advanced-contact-us.html
/contact page and the /contact/index/post action with the module's own controllers./contact with a success or error message.RemoteAddress, so alternative client IP headers configured for a trusted proxy or CDN are honoured. A spoofed X-Forwarded-For header is ignored unless such a header has been configured.panth_contact_submission with IP address, user agent and store ID.Test/Unit.The form at /contact posts to contact/index/post, built with the store URL so store codes in URLs and installs under a sub-path work. It contains:
telephone) and Subject when enabled, each optionally requiredcustom_ followed by the lower-cased label with any character other than a-z, 0-9 and underscore replaced by an underscore; when two labels produce the same name, the later fields get _2, _3 and so on appendedform_key, honeypot website_url and _timestamp inputsOn success the form card is replaced by the "Message Sent!" panel with the configured success message. Validation errors from the server are shown above the form.
panth_contact_submission with status 0 (New).data variable is empty.panthcontact/submission/view): name, email, phone, subject, message, custom fields, IP address, submitted date (store timezone) and store name, with "Back to List", "Reply via Email" and "Delete" buttons, plus "Mark as Replied" (or "Mark as Read" once replied) and "Mark as New". Opening a New submission marks it Read. "Reply via Email" only opens the mail program and does not change the status; mark the submission Replied once the answer is sent. The status buttons and mass actions need the "Change Submission Status" ACL permission.There is no attachment or file upload support.
website_url is not empty the request gets the success response and nothing is saved.Model\Spam\ContentGuard): the name, subject, message and custom_* values are checked for built-in shortener domains (share.google, t.me, bit.ly, tinyurl.com, goo.gl, is.gd, cutt.ly, rebrand.ly, rb.gy, shorturl.at) plus the "Additional Blocked Terms"; for Russian-language money-transfer phrases combined with a currency mention or a link; for three or more http(s):// links; and for a URL or www. in the name or subject when that value is 40 characters or shorter. A match gets the success response, is logged, and is not saved or emailed.Email and telephone values are not inspected by the content guard. Blocked submissions are not counted towards the rate limit because they are never stored.
view/frontend/templates/form.phtml: the contact page (form, sidebar, inline CSS and JavaScript). Copy it to app/design/frontend/<Vendor>/<theme>/Panth_AdvancedContactUs/templates/form.phtml. Keep the call $viewModel->getAntiSpamFieldsHtml() inside the <form>; if it is missing, Block\Frontend\Form inserts the fields after the opening <form> tag, and when they still do not arrive the controller logs a notice and skips the honeypot and timing checks.view/adminhtml/templates/submission/view.phtml: the admin detail page.view/frontend/email/admin_notification.html and view/frontend/email/customer_confirmation.html: the email templates, also editable in the admin under Marketing > Email Templates.--contact-primary, --contact-primary-hover, --contact-bg, --contact-card-bg, --contact-border, --contact-text, --contact-text-muted, --contact-input-bg, --contact-input-focus, --contact-radius, --contact-success and --contact-error, with fallbacks in the template; etc/theme-config.json declares their defaults and etc/frontend/di.xml registers the module with Panth\Core\ViewModel\ThemeConfig. The Send Message button uses the theme fill shade --color-primary-fill (default #0F766E) so its white label meets WCAG AA contrast; --contact-primary drives the checkbox and icon accents.USER_GUIDE.md walks through the configuration groups, the admin submission grid and statuses, creating custom fields, and troubleshooting (form not showing, emails not sending, bot protection too strict, custom fields not appearing).
See CHANGELOG.md.
| Platform | Versions |
|---|---|
| Magento Open Source | 2.4.4 to 2.4.8 (as published on the product page) |
| Adobe Commerce | 2.4.4 to 2.4.8 (as published on the product page) |
| PHP | 8.1 or later (composer.json requires php >=8.1) |
| Themes | Luma and Luma-based themes; renders on Hyva with its own inline styling |
Composer constraints on Magento packages: magento/framework >=103.0, magento/module-contact >=100.4, magento/module-backend >=102.0, magento/module-ui >=101.2.
mage2kishan/module-core ^1.0 (Panth_Core; installed automatically by Composer). The admin menu entry is placed under the "Panth Extensions" menu that Panth_Core provides.Magento_Contact, Magento_Backend and Magento_Ui must be enabled (the module is sequenced after them).No other packages are required or suggested in composer.json.
composer require mage2kishan/module-advanced-contact-us
bin/magento module:enable Panth_Core Panth_AdvancedContactUs
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:flush
setup:di:compile is only needed when the store runs in production mode. The module ships no files under view/*/web, so no static content deployment is required.
Check the result with:
bin/magento module:status Panth_AdvancedContactUs
After installation open /contact on the storefront to see the new form, and in the admin open Panth Extensions > Contact Us > Submissions.
Admin path: Stores > Configuration > Panth Extensions > "Advanced Contact Us". All fields can be set at default, website and store view scope. The ACL resource for this section is Panth_AdvancedContactUs::config.
| Setting | Default | What it does |
|---|---|---|
| "Enable Module" | Yes | When set to No the contact page shows the stock Magento_Contact form and posts are handed to the stock Magento_Contact controller; nothing is stored in panth_contact_submission. |
| "Page Title" | Contact Us | Heading of the contact page and the browser title. |
| "Success Message" | Thank you for reaching out! We've received your message and will get back to you within 24 hours. | Text shown after a successful submission (and after silently dropped spam). |
| "Show Contact Info Sidebar" | Yes | Shows the "Get in Touch" card next to the form. |
| Setting | Default | What it does |
|---|---|---|
| "Email Address" | hello@example.com | Shown as a mailto link in the sidebar. Falls back to hello@example.com when empty. |
| "Phone Number" | 1-800-SHOP-NOW | Shown as a tel link in the sidebar; hidden when empty. |
| "Address" | Your Store Address | Shown in the sidebar; hidden when empty. |
| "Business Hours" | Mon - Fri: 9:00 AM - 6:00 PM | Shown in the sidebar; hidden when empty. |
| Setting | Default | What it does |
|---|---|---|
| "Show Phone Field" | Yes | Adds the phone input to the form. |
| "Phone Required" | No | Makes the phone field mandatory (checked in the browser and on the server). Only applies, and is only shown, while "Show Phone Field" is Yes. |
| "Show Subject Field" | Yes | Adds the subject input to the form. |
| "Subject Required" | No | Makes the subject field mandatory. Only applies, and is only shown, while "Show Subject Field" is Yes. |
| "Custom Fields" | (none) | Dynamic rows with columns "Field Label", "Type", "Required", "Placeholder" and "Options". Type is one of text, textarea, select, radio, checkbox, email, tel; Required is 1 or 0; Options is a comma-separated list for select and radio. Rows without a label are ignored. A required custom field left empty is refused with "<Label> is required.", and a select or radio value that is not one of the options is refused with "Please select a valid option for <Label>." |
| Setting | Default | What it does |
|---|---|---|
| "Admin Notification Email" | hello@example.com | Recipient of the notification sent for every accepted submission. |
| "Sender Email Identity" | General Contact | Store email identity used as the From address of both emails. |
| "Send Customer Confirmation" | Yes | Sends a short acknowledgement to the address entered in the form. The submitted text is not included. Set to No to send no copy. |
| "Max Confirmations Per Recipient Per Hour" | 2 | Confirmation emails sent to one address within an hour. Later submissions are still stored and notified to the admin, but no confirmation is sent. 0 sends none. |
| "Max Confirmations Per Client IP Per Hour" | 5 | Confirmation emails triggered from one client IP within an hour. 0 sends none. |
The template identifiers are stored in panth_advancedcontact/email/admin_template (default panth_advancedcontact_admin_notification) and panth_advancedcontact/email/customer_template (default panth_advancedcontact_customer_confirmation). They are set in etc/config.xml only and have no field in the admin form.
| Setting | Default | What it does |
|---|---|---|
| "Enable Honeypot" | Yes | Adds a hidden website_url input. A submission with a value in it receives the success response and is discarded. |
| "Block Spam By Message Content" | Yes | Runs the content guard over the name, subject, message and custom field values. Matches are discarded with the success response, not stored and not emailed. |
| "Additional Blocked Terms" | (empty) | Extra terms or domains, one per line (commas also separate terms), added to the built-in list of link-shortener domains. Matched whole-word and case-insensitively. Shown only when the content guard is enabled. |
| "Enable Rate Limiting" | Yes | Counts stored submissions from the same client IP address in the last hour and rejects further ones with an error message. |
| "Max Submissions Per Hour (per IP)" | 5 | Limit used by rate limiting. Shown only when rate limiting is enabled. An empty or 0 value falls back to 5. |
| "Minimum Form Fill Time (seconds)" | 2 | A hidden timestamp is rendered with the form; a submission arriving sooner than this many seconds after rendering receives the success response and is discarded. 0 turns the check off; an empty value falls back to 2. |
Configuration paths:
panth_advancedcontact/general/enabled, page_title, success_message, show_infopanth_advancedcontact/contact_info/email, phone, address, hourspanth_advancedcontact/fields/show_phone, phone_required, show_subject, subject_required, custom_fieldspanth_advancedcontact/email/recipient_email, sender_email_identity, send_confirmation, confirmation_max_per_recipient, confirmation_max_per_ip, admin_template, customer_templatepanth_advancedcontact/protection/honeypot, content_guard, blocked_terms, rate_limit, max_per_hour, min_timeWith the defaults the module is active immediately after installation: the form shows name, email, phone, subject and message, the sidebar shows the placeholder contact details, all four protection layers are on, and both emails go to hello@example.com until "Admin Notification Email" and "Email Address" are changed.
bin/magento module:disable Panth_AdvancedContactUs
composer remove mage2kishan/module-advanced-contact-us
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:flush
The module has no uninstall script. The panth_contact_submission table and its rows, and the panth_advancedcontact/* values in core_config_data, remain in the database until removed manually. Disabling the module restores the stock Magento_Contact page.
Free and open source under the MIT License. See LICENSE.txt.
Panth_AdvancedContactUs; Composer package: mage2kishan/module-advanced-contact-us; namespace: Panth\AdvancedContactUs; version 1.1.2.Magento_Contact, Magento_Backend, Magento_Ui, Panth_Core.contact (registered before Magento_Contact) served by Controller\Index\Index (GET) and Controller\Index\Post (POST); admin panthcontact with Controller\Adminhtml\Submission\Index, View, Delete and MassDelete.Controller\Index\Index adds the handle panth_advancedcontactus_form when "Enable Module" is Yes. That handle removes contactForm, contact.details, form.additional.info, form.additional.after and page.main.title, and adds the non-cacheable block panth.contact.form (Block\Frontend\Form) with view model ViewModel\ContactForm. contact_index_index.xml only sets the 1column page layout.Model\Config: typed getters for every configuration value.ViewModel\ContactForm: form key, form action, logged-in customer name and email, custom fields as JSON, getAntiSpamFieldsHtml(); constants HONEYPOT_FIELD (website_url), TIMESTAMP_FIELD (_timestamp) and MARKER (data-panth-antispam).Model\Spam\ContentGuard: detect(array $values, array $shortFieldKeys): ?string returns the block reason or null; sample() returns a short text sample for logging.Model\Mail: sendAdminNotification(array $data) and sendCustomerConfirmation(array $data) built on Magento\Framework\Mail\Template\TransportBuilder.Model\Submission (constants STATUS_NEW = 0, STATUS_READ = 1, STATUS_REPLIED = 2), Model\ResourceModel\Submission and Model\ResourceModel\Submission\Collection.Controller\Index\Post implements CsrfAwareActionInterface and validates the form_key in validateForCsrf(). An invalid form key gets a JSON error (HTTP 403) for AJAX requests and the standard Magento redirect with "Invalid Form Key" otherwise. Responses are JSON when the ajax parameter is set, otherwise a redirect to /contact with a session message. When "Enable Module" is No the request is passed to Magento\Contact\Controller\Index\Post.etc/di.xml registers the virtual type Panth\AdvancedContactUs\Model\ResourceModel\Submission\Grid\Collection as data source panth_contact_submission_listing_data_source for the UI listing panth_contact_submission_listing. Grid columns Status and Actions are Ui\Component\Listing\Column\Status and Ui\Component\Listing\Column\Actions.etc/email_templates.xml): panth_advancedcontact_admin_notification and panth_advancedcontact_customer_confirmation, area frontend.etc/acl.xml): Panth_AdvancedContactUs::config ("Panth Advanced Contact Us", under Stores > Configuration), Panth_AdvancedContactUs::contact ("Contact Submissions"), Panth_AdvancedContactUs::submission_view ("View Submissions"), Panth_AdvancedContactUs::submission_delete ("Delete Submissions").etc/db_schema.xml): panth_contact_submission with columns submission_id, name, email, telephone, subject, message, custom_fields (JSON), status, ip_address, user_agent, store_id, created_at; indexes on email, status, store_id and created_at.view/adminhtml/templates/submission/view.phtml are not wrapped in __(), and the module ships no i18n directory.| Module Category | Forms & Communication |
|---|---|
| Best For | All Sizes |
Yes. When the module is enabled, the /contact URL is handled by Panth Advanced Contact Us and the stock Magento_Contact form is bypassed. Disable the module to revert to the native form, no data loss.
This specific module ships a Luma-compatible vanilla JS frontend. It will render and function on Hyva, but for the Alpine.js + Tailwind native Hyva experience, use the Hyva-specific variant in the Panth suite. Both share the same admin grid and backend logic.
No. Panth Advanced Contact Us uses its own silent anti-spam. You can additionally enable Magento's native Google reCAPTCHA v3 on the contact form for a fourth layer of protection, the module respects the standard reCAPTCHA hook.
Yes. The admin submission grid supports Magento's standard Export to CSV / XML action. Bulk select submissions and choose Export from the mass-action dropdown.
The module stores only what the customer submitted. To support data-subject deletion requests, use the Bulk Delete mass action or call the repository's deleteById() method from a custom GDPR handler. Submission retention duration is unrestricted, add a cron job to purge old entries if needed.
Not in the base module. For file attachments, use Panth Order Attachments (for orders) or Panth Dynamic Forms (for general form builder with file uploads). Custom file fields can be added via a small extension plugin.
Copy the template from view/frontend/templates/form.phtml into your theme at app/design/frontend/<Vendor>/<theme>/Panth_AdvancedContactUs/templates/form.phtml and edit. All styling is via standard CSS, no build step required.
Yes. All settings respect Magento's scope hierarchy (default → website → store view), and all user-facing strings pass through Magento's __() translation function. Translate the module to any language via i18n/<locale>.csv.
Talk to Kishan directly: written quote, scope and timeline within 24 hours. No sales call.
Advanced Contact Form for Magento 2