Embedding and hosting
Overview
Section titled “Overview”A saved, active form can reach visitors in three ways:
| Where | How |
|---|---|
| Any website | Paste the Embed code from the Embed tab of the builder. |
| Its own page | Share the Hosted page link from the same tab. |
| An amabledata landing page | Add the Form widget in the page editor and pick the form. |
All three render the same widget, with the same fields, validation, style and spam protection, and send submissions to the same place. This page covers the setup on your side; what visitors see is described in Hosted forms.
Open the Embed tab from Marketing › Forms › your form › Builder › Embed.
How it works
Section titled “How it works”The widget
Section titled “The widget”The embed code loads a small script, forms.js, from your amabledata edge address (the same origin as the hosted page). The script finds every element with a data-amable-form attribute, downloads the public configuration of that form and renders it inside a shadow root, so your site’s CSS does not affect the form and the form’s CSS does not leak into your site. Forms added to the page later (for example in a modal or by a single-page app) are detected and rendered automatically. You can put several different forms on the same page.
The public configuration contains the fields, settings (except the allowed websites) and style, never the CRM settings. HTML blocks are sanitized before they are sent. The configuration is cached for up to 30 seconds and the script for up to an hour, so a saved change can take a few seconds to show up.
The Embed tab warns “You have unsaved changes: embeds show the last saved version.” while the builder has unsaved changes.
The hosted page
Section titled “The hosted page”When Public hosted page is on (Settings tab, on by default), the form is also served at:
<edge address>/f/<workspace slug>/<form id>It is a simple, mobile-friendly page with the form on a white card, titled <form name> · <workspace name>, in the form’s language (or the visitor’s when the form follows the browser). The page asks search engines not to index it (noindex, nofollow). When the hosted page is off, the link answers “This form is not available.” and the Embed tab says “The hosted page is disabled in the settings.” Embeds keep working.
Domains
Section titled “Domains”The embed code and hosted link use the edge address of your installation, which is the domain shown in the Embed tab. The script and the submit endpoint accept requests from any website (no cookies are involved), unless you restrict them with Allowed websites.
Allowed websites
Section titled “Allowed websites”In the Settings tab, Allowed websites lists the domains where the form may be embedded: “Domains where the form may be embedded, comma separated. Empty: any.”
- A domain also allows its subdomains:
example.comallowswww.example.comandshop.example.com. - The check uses the address of the page that submits the form (or the browser’s referrer when the page address is missing).
- The hosted page of the form is always allowed.
- Submissions from other websites are rejected and the visitor sees “This form cannot be used on this website.”
- Up to 50 domains; letters, digits, dots and dashes, without
https://or paths.
Attribution on your site
Section titled “Attribution on your site”On every page where the form is embedded, the widget reads the UTM parameters and click ids (gclid, fbclid, msclkid, ref) from the URL and keeps them for the browser session; it also records the first page and referrer of the session. When the page also runs the amabledata analytics tracker on the same site, the visitor id is attached, so the submission joins the visitor’s journey. See Field types.
Landing pages
Section titled “Landing pages”On amabledata landing pages, add the Form widget (category Forms and booking) and pick the form from the list. The page id is attached to every submission, so the contact’s submission history shows the page title. See Blocks reference.
Step by step
Section titled “Step by step”Embed a form on your website
Section titled “Embed a form on your website”- Save the form and make sure it is Active.
- Open the Embed tab and click Copy next to Embed code (“Paste it where the form should appear on your website.”).
- Paste the code in your page HTML where the form should appear. In site builders use an “HTML” or “custom code” block.
- Publish your page and open it. The form appears with its style.
- Send a test submission and check it in the Submissions tab.
The code looks like this:
<div data-amable-form="01JABCDEF0123456789" data-amable-tenant="acme"></div><script async src="https://edge.example.com/forms.js"></script>If you embed several forms on the same page, repeat only the div; one script tag is enough.
Share the hosted page
Section titled “Share the hosted page”- Make sure Public hosted page is on in the Settings tab and the form is saved and active.
- In the Embed tab, under Hosted page, click Copy to copy the link or Open to see it in a new tab.
- Share the link in emails, social profiles, QR codes or ads. Add UTM parameters or prefill parameters to the link as needed, for example
?utm_source=instagram&email=jane@example.com.
Restrict a form to your websites
Section titled “Restrict a form to your websites”- Open the Settings tab.
- In Allowed websites type your domains, for example
example.com, example.org. - Save, then test from one of the allowed sites and from the hosted page.
Post from your own HTML form
Section titled “Post from your own HTML form”If you prefer to write the HTML yourself, the submit endpoint also accepts a plain form post (application/x-www-form-urlencoded). Name each input after the field key; repeat a name for multiple choices.
<form method="post" action="https://edge.example.com/f/acme/01JABCDEF0123456789"> <input name="first_name" required> <input name="email" type="email" required> <input name="privacy" type="checkbox" value="1" required> <input name="company_website" style="display:none" tabindex="-1" autocomplete="off"> <button type="submit">Send</button></form>The server validates the fields exactly like the widget. On success it redirects to your Redirect URL (HTTP 303) or shows the thank-you message on a simple page; on errors it shows a page with “Please check the highlighted fields.”, the Turnstile error, “This form is not available.” or “Something went wrong. Please try again.”. company_website (or _hp) is the honeypot: keep it empty and hidden. Turnstile, when required, expects the cf-turnstile-response field of the Turnstile widget. UTM parameters are not captured automatically in this mode.
Style the form
Section titled “Style the form”-
Open the Style tab and set Accent, Text, Background, Input background, Borders, Button text, Corner radius, Font size, Spacing, Max width and Font family.
-
For anything else, write Custom CSS using the
.af-*classes, for example:.af-button { text-transform: uppercase; letter-spacing: .05em; }.af-label { font-weight: 500; } -
Save. The full list of style options and classes is in Form builder.
Because the form lives in a shadow root, your site’s CSS cannot reach it: style it from the Style tab. The font family must be available on the page (a system font, or a web font your site already loads).
Reference
Section titled “Reference”Embed tab
Section titled “Embed tab”| Section | Content | Actions |
|---|---|---|
| Embed code | The HTML snippet. | Copy |
| Hosted page | The hosted link, or “The hosted page is disabled in the settings.” | Copy, Open (only when enabled) |
| Footer note | “On amable landing pages, drag the Form widget and pick this form.” | — |
Embed attributes
Section titled “Embed attributes”| Attribute | Required | Meaning |
|---|---|---|
data-amable-form |
Yes | Id of the form. |
data-amable-tenant |
Yes | Slug of your workspace. |
data-amable-page |
No | Id of an amabledata landing page, to attribute the submission to it (added automatically by the Form widget). |
Public endpoints
Section titled “Public endpoints”| Method and path | Purpose |
|---|---|
GET /forms.js |
The widget script. |
GET /f/<workspace>/<formId> |
Hosted page. |
GET /f/<workspace>/<formId>/config |
Public configuration (JSON). |
POST /f/<workspace>/<formId> |
Submit (JSON from the widget, or a urlencoded form post). Maximum 64 KB. |
See Tracking endpoints and Hosted forms for the visitor side.
Limits and permissions
Section titled “Limits and permissions”- Viewing the Embed tab needs
forms:read; changing settings and style needsforms:write. - Only active, non-archived forms load and accept submissions.
- Allowed websites: up to 50 domains.
- Submissions: 64 KB each, 30 every 10 minutes per IP address per workspace.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Cause | Fix |
|---|---|---|
| “This form is not available.” where the form should be. | The form is inactive, archived, deleted, or the id in the code is wrong. | Activate the form, or copy the embed code again. |
| “The form could not be loaded.” | The script could not reach your edge address, or the div lacks one of the two attributes. |
Check the attributes and that the page can load forms.js (some content security policies block external scripts). |
| Nothing appears at all. | The script tag is missing or blocked. | Make sure the script tag is on the page and allowed by your site’s security policy. |
| “This form cannot be used on this website.” | The page’s domain is not in Allowed websites. | Add the domain (the parent domain covers subdomains). |
| “The anti-spam check failed. Please try again.” | Turnstile could not verify the visitor. | Ask the visitor to retry; if your site has a content security policy, allow https://challenges.cloudflare.com. |
| The hosted link says “This form is not available.” but the embed works. | Public hosted page is off. | Turn it on in the Settings tab and save. |
| My change is not visible. | The form is not saved, or the configuration is cached for up to 30 seconds. | Save and reload after a few seconds. |
| My site’s fonts or colors are not applied. | The form is isolated in a shadow root. | Use the Style tab and Custom CSS. |

