Embedding a form on your own site
A form on your Sliick Edge address can be embedded in a page on your own website. The form is still hosted on Sliick Edge: your page just shows it in a frame.
This page is for two people: the admin who turns embedding on, and the web developer who looks after the website. Share it with both. The most common problem, a blank box where the form should be, can be caused on either side.
What you get
Section titled “What you get”The Share tab gives you one snippet: a plain <iframe>. There is no script version. Everything below follows from it being a simple frame.
Three things to set up first
Section titled “Three things to set up first”The Share tab only shows a snippet once the form can be embedded. Until then it tells you what is missing, one thing at a time, in this order.
1. The form must not take a payment. A form with a Stripe payment field cannot be embedded, because card entry inside an embedded frame has not been confirmed to work. Share the public link instead.
2. The form must be on your Sliick Edge address. Tick Allow on your public Sliick Edge address in Form settings, Availability. See Hosting on Sliick Edge.
3. At least one website must be on the embed allowlist. Add it in Form settings, Availability, under Embed allowlist. You can also add it straight from the Share tab.
An empty allowlist allows nobody, not everybody. With nothing listed, the form shows as a blank frame on every website, including yours. There is no “allow all” option.
What to put on the embed allowlist
Section titled “What to put on the embed allowlist”List the exact website addresses that will show the form. Wildcards such as https://*.acme.com are not accepted, because they could also match other people’s sites on shared hosting.
Each entry is the start of a web address: https://, then the host name, and a port if there is one. No path and no trailing slash. Separate entries with commas.
| Value | Accepted | Why |
|---|---|---|
https://www.acme.com | Yes | Scheme and host |
http://dev.acme.com:8080 | Yes | A port is allowed, and so is http |
https://acme.co.uk | Yes | Any number of parts in the name |
https://acme.com, https://www.acme.com | Yes | Two entries, separated by a comma. These are two different addresses |
https://*.acme.com | No | Wildcards are not accepted |
https://www.acme.com/careers | No | No paths |
www.acme.com | No | Must start with https:// or http:// |
http://localhost:3000 | No | The host name needs at least one dot |
http://127.0.0.1:3000 | No | IP addresses are not accepted |
Testing on your own computer: use http://dev.localhost:3000. It is accepted, and every current browser treats it as your own machine.
Embed allowlist and CORS allowlist are different. The Embed allowlist controls which websites can show the form in a frame. The CORS allowlist is for developers who fetch a form’s data with their own code, and it does accept one leading wildcard such as https://*.acme.com, though not a wildcard over a whole top-level domain. To embed a form, you only need the Embed allowlist.
The snippet
Section titled “The snippet”Copy it from the builder’s Share tab with Copy embed code. It looks like this:
<iframe src="https://acme.sliick.net/embed/contact-us"
width="100%" height="640" style="border:0"
title="Contact us" loading="lazy"></iframe>
srcis your form’s embed address. Paste it exactly as the Share tab gives it.heightis a fixed height in pixels, estimated from the longest page of your form. You will probably want to adjust it. The frame does not resize itself.width="100%"fills the space it is placed in. Change the width of the surrounding element, not the frame.titleis the form’s name, and it must stay. Screen readers need it to describe the frame. You can change the wording, but do not remove it.loading="lazy"waits to load the form until the visitor scrolls near it. You can remove it if the form is the main thing on the page.
Content Security Policy on your website
Section titled “Content Security Policy on your website”If your website sends a Content Security Policy, the browser will not show the frame unless your Sliick Edge address is allowed. Add this to the policy, using the host from your own snippet:
frame-src https://acme.sliick.net;
If your policy has no frame-src line, the browser uses default-src instead. A strict default-src therefore blocks the frame. Adding frame-src fixes it either way.
You do not need
script-src,style-src,connect-srcorfont-srcentries for the form. Your policy only decides whether the frame may appear. What loads inside the frame is not affected by your policy.
What an embedded form cannot do
Section titled “What an embedded form cannot do”- It cannot resize itself. Set the height for the longest page you care about. Forms with several pages are the awkward case.
- It cannot send people to your own thank-you page after they submit. The success message appears inside the frame. If you need a redirect, link to the form on its own page instead.
- It cannot pick up prefill values or tracking details from your page, because the frame does not know what your page knows.
There is one way round point 3. A prefill link does work in an embed, but you have to put it in the src yourself. The form then loads already filled in, just as it would on its own page.
Prefill and resume links in an embed
Section titled “Prefill and resume links in an embed”Both work. Two things to know.
A link that carries a reference can be read by anything that records web addresses. Prefill and resume links include a reference in the address. Analytics tools, proxies and anything else that records full addresses will capture it. The form removes the reference from the browser’s address bar once it has been read, so it does not stay in browser history. It cannot remove it from records your own systems have already kept.
Do not paste a respondent’s resume link into anything that stores web addresses. A resume link opens that person’s answers. Send it to them and nowhere else.
A brand-new link may take a second to work. If you create a link and open it straight away, as you would when testing, the first try may restore nothing. The form says it is restoring the saved answers and tries again by itself.
Cookies
Section titled “Cookies”The embedded form sets one cookie. Its only job is to keep a visitor on the same version of the form during an A/B test, if they reload the page. It is not used for tracking, advertising, or recognising anyone across websites.
Some browsers, such as Safari, block this cookie inside an embedded frame. The form still loads, checks answers, submits and confirms normally with no cookies at all. The only effect is that a returning visitor may see the other version during a test.
The frame is blank
Section titled “The frame is blank”There are four common causes. Each looks slightly different.
| What you see | Cause | Fix |
|---|---|---|
| The Share tab shows no snippet, just a message | One of the three set-up steps above | Do what the message says. It names one thing, and it is the one to fix |
A blank frame, and the browser console mentions frame-src and your website’s policy | Your website’s Content Security Policy | Add frame-src for your Sliick Edge address |
A blank frame, and the browser console mentions frame-ancestors or refuses to display the page | The embed allowlist | Add the exact address of the page showing the form, including https:// |
| The frame loads, but the form says the link has expired | A prefill or resume link that has run out | Not an embedding problem. Send a new link |
Two tips. The address on the allowlist is your website’s address, not the form’s. And acme.com and www.acme.com are different addresses, so list both if your site uses both. If the frame is blank and the browser console shows nothing, check that the src is exactly what the Share tab gave you. A mistyped address is the one cause with no error message.