Skip to content

Custom Forms

VIDEO WALKTHROUGH

Custom Forms: setup guide

2:36

Recorded on version 1.0.2 · Narrated walkthrough · English captions

Jump to a chapter 8 chapters
Read the full video transcript
Custom Forms 1.0.2 — Magento Admin setup

00:00:00 — Set up Custom Forms
Welcome to the Agentic Ecom Custom Forms Admin guide. We'll walk through the main setup screens and the checks to make before using the module. This guide assumes the extension is already installed.

00:00:12 — Open settings and choose scope
Start in Magento Admin and open Stores, Configuration. Choose Custom Forms. Check the Scope selector before editing. Use the appropriate website or store view where the setting supports it. The screen values here are a demonstration; enter the settings and service details that belong to your own store.

00:00:32 — Enable the form tools
Enable Custom Forms in General. Global configuration sets defaults, while the working screens are under Content, Custom Forms. Plan the fields you actually need and the destination for submissions before creating a public form.

00:00:48 — Choose spam protection
Review the honeypot, score threshold, blocked keywords and automatic rejection. Start by reviewing flagged submissions before enabling aggressive rejection. Optional AI scoring uses your own OpenAI or Google Gemini account, can incur separate charges, and can send parts of submitted text to the chosen provider. Review your privacy notice first.

00:01:12 — Configure notification delivery
Set the Admin Notification sender, recipients and template deliberately. Review the separate autoresponder and webhook groups only if you need them. A webhook forwards submission data to another system, so check its destination and signing settings. Test email transport before relying on notifications.

00:01:32 — Build a reviewable form
Open Forms and create a new form. Enter a Form Title and a stable Form Code, add the fields in Form Builder, then set the submit button and success message on Content. Save the form and embed it using the documented method. Submit a disposable test and confirm the saved data and intended notifications.

00:01:52 — Save and verify your setup
When your required settings are complete, use the screen's Save control and wait for Magento's confirmation. Then reopen the record or configuration and check the saved values at the intended scope. If the storefront still shows earlier settings, refresh the relevant caches. Test your own configuration before using it with customers.

00:02:14 — Your setup checklist
That's the Admin setup walkthrough for Custom Forms. Check permissions and scope, review the module-specific settings, then save and verify a small staging example. Use the written guide at user guides dot Agentic Ecom dot net for installation details, complete field references and any separate storefront integration steps.

Custom Forms 1.0.2 lets you build forms with a visual editor, collect and manage submissions inside the admin, route them to email, push them to external systems through an optional signed webhook, and protect them from spam — all without writing code. It works on a standard Magento store and on a headless (Astro) storefront via GraphQL or REST. Optional AI spam scoring supports OpenAI and Google Gemini and is off by default. The selected external provider may charge separately for API use.

Custom Forms in the admin — the forms list, submissions inbox, a submission, and the configuration screen

The Composer commands below are for a direct AgenticEcom purchase. If you bought this extension through Adobe Commerce Marketplace, use the purchased Composer package from repo.magento.com with Adobe Marketplace access keys; see Getting Started. A Marketplace purchase should not require a second AgenticEcom direct-store licence.

Install Custom Forms with Composer using your AgenticEcom licence key (find it on your My Licences page — one key unlocks every module you own):

Terminal window
# 1. Register the AgenticEcom repository (once per store)
composer config repositories.agenticecom composer https://repo.agenticecom.net
composer config --global --auth http-basic.repo.agenticecom.net <YOUR-LICENCE-KEY> x
# 2. Require this module
composer require agenticecom/module-customforms:^1.0.3
# 3. Apply it
php bin/magento setup:upgrade && php bin/magento setup:di:compile && php bin/magento cache:flush

Magento

Release 1.0.2 installed, upgraded and compiled on Open Source 2.4.9. Test other 2.4 environments on staging.

PHP

Release QA used 8.5.10. Check Composer requirements and test your PHP version.

Storefront

Standard Luma/PWA and headless (Astro) via GraphQL/REST.

PDF

Composer installs the required mpdf/mpdf dependency for PDF export & email attachments.
  1. Go to Content → Custom Forms → Forms and click Create New Form.

  2. On the General tab, enter a Form Title and a Form Code (lowercase, numbers and underscores — used for embedding).

  3. Open the Form Builder tab and add your fields.

  4. Set the Submit Button Text and Success Message on the Content tab.

  5. Click Save Form.

  6. Embed it on a page — or it’s instantly available to a headless storefront by its code.


Before building forms, set the store-wide defaults at Stores → Configuration → AgenticEcom · Sales, Customers & Marketing → Custom Forms. Every setting here is a default that individual forms can build on; spam, reCAPTCHA, email and webhook all live here. The working screens are under Content → Custom Forms (Forms, Submitted Data, Autoresponder Templates, Configuration).

The Custom Forms configuration section with all nine setting groups

  • Enable Custom Forms — master on/off switch for the whole module.

Content → Custom Forms → Forms lists every form you’ve built. Each row shows the ID, Form Name, Code, whether it’s Active, whether AI Spam Protection is on, and the Created date. Use the row’s Select → Edit / Delete, or the Actions menu for bulk operations. Create New Form (top-right) starts a new one.

The Custom Forms grid listing several forms a merchant might build

Move a form between stores — staging → live, or one client site to another — without rebuilding it. Export writes the form’s definition (its fields, content, routing and spam settings) to a portable JSON file; import re-creates it on the target store.

  1. Export one form — on the forms grid, open the row’s Select menu and choose Export. You’ll download custom-form-&lt;code&gt;.json.

  2. Export several at once — tick the forms you want, then Actions → Export Selected. All of them are written to a single JSON file.

  3. Import — on the target store, click Import Forms (top of the grid), choose the .json file, and Import. Each form in the file is created and you’re returned to the grid with a confirmation.

A form-edit screen has five tabs down the left under FORM CONFIGURATION: General, Notifications, Content, Form Builder and Embedding.

The General tab — enable, title, code, store views and customer groups

  • Enable Form — turn this individual form on or off.
  • Form Title — shown in the grid and (optionally) above the form.
  • Form Code — the unique identifier used for embedding. Lowercase letters, numbers and underscores only.
  • Store Views — restrict the form to specific store views (leave to show everywhere).
  • Customer Groups — restrict the form to specific customer groups.

The Content tab — submit button text, success message, popup mode and per-form CAPTCHA

  • Submit Button Text — the call-to-action on the button (e.g. Send message, Request a Quote).
  • Success Message — shown after a successful submission. Set / AJAX-style success without a page reload.
  • Show as Popup — render the form inside a modal triggered by a button instead of inline.
  • Popup Button Text — the label of that trigger button.
  • Enable CAPTCHA — turn on reCAPTCHA v3 verification for this form (needs keys in global config).

The Notifications tab — per-form admin email and autoresponder overrides

  • Send Email to Admin on Submission — toggle admin notifications for this form.
  • Notification Recipients — per-form recipients (comma-separated, no spaces). Overrides the global default.
  • Email Template — leave on Use Default, or pick a custom one. You can manage reusable form-email templates in the module’s own Content → Custom Forms → Autoresponder Templates screen (or use a core Magento template from Marketing → Email Templates).
  • Send Auto-Reply to Submitter — per-form autoresponder. Requires an email field in the form so the module knows where to reply.

The builder has a Form Layout canvas on the left and a Field Types palette on the right. Click a palette field to append it, or drag it onto the canvas. Every field has a drag handle to reorder, plus Duplicate, Edit and Delete actions.

The drag-and-drop form builder: canvas on the left, field-type palette on the right

  • Text Input — short text (names, references).
  • Email — validated email address (used by the autoresponder).
  • Number — numeric-only input.
  • Phone — telephone number.
  • URL — validated web address.
  • Password — masked input.
  • Text Area — long text (messages, descriptions, reviews).
  • Address Block — a ready-made group: address lines, city, county, postcode, country.

Click the Edit (pencil) on a field to configure it:

The field settings panel — label, name, placeholder, required, validation, width and conditional logic

  • Field Label — shown above the field.
  • Field Name — the data key (lowercase, no spaces). This is the key you’ll see in submissions and the API payload.
  • Placeholder — hint text inside the input.
  • Required — make the field mandatory (enforced in the browser and server-side).
  • CSS Class — a custom class for styling.
  • Validation — None, Email, URL, Alphanumeric or Numeric (also enforced server-side).
  • Column Width — 100 / 75 / 66 / 50 / 33 / 25%. Fields whose widths add up to 100% sit side by side on one row, and stack on mobile.
  • Conditional Logic — show or hide the field when other fields match rules (AND/OR).

Heading and Paragraph fields carry a full WYSIWYG editor in their Content setting. Format with the toolbar, or click <> Source code to paste/edit raw HTML. Whatever you enter renders formatted on the storefront — type plain text and it’s wrapped for you; paste HTML and it’s sanitised and rendered.

A File Upload field accepts these types by default, up to 5 MB each:

jpg, jpeg, png, gif, webp, bmp, heic · pdf, doc, docx, xls, xlsx, ppt, pptx · txt, csv, rtf, odt, ods, zip

After the first save, the form’s Embedding tab shows three ready-to-paste snippets:

The Embedding tab — CMS block code, Astro component tag and a direct URL

<div class="agentic-custom-form agentic-form--contact_us"></div>

Paste into any CMS block or page (Show/Hide Editor → HTML). The storefront renders the live form in its place.


Open Content → Custom Forms → Submitted Data.

  • The grid lists every submission with Status (New, Read, Replied, Spam), Spam Score, email, name, IP and date — filter, search and sort.
  • Select → View opens the full submission with every field value (uploaded files appear as download links) and an inline reply form. Opening a New submission marks it Read.
  • Reply emails the submitter (using your Reply Form template) and marks it Replied.
  • Actions (mass): set status, mark as spam, or delete in bulk.
  • Export to CSV — a spreadsheet of all submissions (UTF-8, Excel-friendly).
  • Export to PDF — a branded PDF (uses the bundled mpdf library). Per-form export buttons live on the form-edit action bar.

Submission lifecycle: storefront to validation, spam scoring, storage, then email, autoresponder and webhook

One server pipeline handles both the standard storefront and the headless GraphQL/REST endpoints, so validation, spam scoring and notifications behave identically everywhere.

  • Admin Notification — email your team on every genuine submission. Recipients, sender and template are set globally and can be overridden per form; optionally attach a PDF.
  • Autoresponder — automatically thank the submitter; sends to the form’s email field.
  • Reply Form — the template, sender and BCC used when you reply from the admin.

You can pull any field’s value into your email templates. In a template (an Autoresponder Template under Content → Custom Forms → Autoresponder Templates, or a core AgenticEcom Custom Form template under Marketing → Email Templates), reference a field by its Field Name — for example a field named order_ref:

Reference supplied: {{var data.order_ref}}

Every submitted field is available on the data object by its field name, so admin and autoresponder emails can be fully personalised.

  1. Honeypot — a hidden field bots fill but humans don’t; a filled honeypot is treated as spam.

  2. Blocked keywords — comma-separated words that flag a submission.

  3. Heuristics — built-in checks (such as excess links and known spam phrases), with conservative handling of ordinary enquiries.

  4. AI scoring (OpenAI or Google Gemini) — an optional second opinion for ambiguous submissions, using your own provider key. A provider failure or unusable response falls back to local checks.

  5. reCAPTCHA v3 — set your keys, enable CAPTCHA on a form, and submissions are verified server-side.

Push every new submission as JSON to an external URL (Zapier, Make, n8n, a CRM, or your own endpoint). Enable it, set the URL, and optionally a signing secret.

  • GDPR Consent — add a consent checkbox with custom text.
  • Date Format — how dates appear in submissions/exports.
  • File Upload Links Lifetime — delete files and end their public links after N days (0 = never). Anyone with a link can open a file until deletion.
  • Submission Retention — auto-delete submissions older than N days (0 = keep forever).

For a decoupled (Astro) storefront, forms are delivered and submitted over GraphQL (a REST equivalent is also available).

# Fetch a form definition
{ customForm(code: "contact_us") {
form_id name code is_active enable_captcha
submit_button_text success_message recaptcha_site_key fields_json
} }
# Submit a form
mutation {
submitCustomForm(
form_code: "contact_us"
data: "{\"name\":\"Jane\",\"email\":\"jane@example.com\",\"message\":\"Hello\"}"
recaptcha_token: "<v3 token, when CAPTCHA is enabled>"
) { success message submission_id }
}

The submit path runs server-side validation, spam scoring and reCAPTCHA, stores the submission, and triggers the admin email, autoresponder and webhook — identically for GraphQL and REST.

Composer installs this dependency with the module:

  • mpdf/mpdf — enables Export to PDF and Attach Submission PDF on notification emails.
Do I need a developer to add a form to a page?

No. Copy the CMS block code from the Embedding tab and paste it into any CMS page or block (in HTML mode). On a headless storefront, drop the <CustomForm code="…" /> tag onto an Astro page.

How does the autoresponder know who to reply to?

It reads the form’s email field. Add an Email field to the form (and enable the autoresponder globally or per-form) and replies go to whatever the submitter entered.

Is the form secure against bots and spam?

The module provides a honeypot, a blocked-keyword list, built-in heuristics, optional OpenAI or Gemini scoring, and optional reCAPTCHA v3 (which fails closed when enabled). Submissions over the spam threshold are flagged and skip all notifications, or can be auto-rejected.

What about secure development practices?

All input is validated and spam-scored server-side (never trusting the browser); uploaded files are restricted by extension and size but are served from public media URLs; secret keys (reCAPTCHA, AI, webhook) are stored encrypted; and webhook payloads are HMAC-signed when a signing secret is configured. Release 1.0.2 installed, upgraded and compiled on Magento Open Source 2.4.9 / PHP 8.5.10.

Can I personalise the notification emails?

Yes. Any field value is available in the email template as {{var data.<field_name>}} — see Custom values in notification emails.

Stores → Configuration → AgenticEcom · Sales, Customers & Marketing → Custom Forms

GroupKey settings
GeneralEnable Custom Forms
Spam ProtectionHoneypot, score threshold, auto-reject, blocked keywords, optional OpenAI or Gemini scoring, encrypted keys and model selection
Google reCAPTCHA v3Site key, secret key, minimum score
Admin NotificationEnable, recipients, sender, template, attach PDF
Reply Form ConfigurationSender, template, BCC
AutoresponderEnable, sender, template
Webhook / ZapierEnable, URL, signing secret
GDPR ConsentEnable, consent text
AdvancedDate format, file-link lifetime, submission retention