Forms · Glossary
What does embedding a form mean?
Embedding a form means showing a form that lives at one web address inside a page at another, usually with an iframe element, so people fill it in without leaving the page they are reading. The form still belongs to the service that hosts it and submits there; only the place it appears changes.
Choosing between an embed and a plain link decides where people meet the form, how it behaves on a phone and whether other sites can copy it. It looks like a small technical choice and it often decides how many visitors finish.
Nuwan Madhusanka · Co-founder
5 min read · Published
| Embed | Link | Popup | |
|---|---|---|---|
| Where the form appears | Inside your page, in a frame | On its own page | Over your page, in a layer |
| Setup | Paste an iframe tag and set its size | Share the address | A script or a site builder feature |
| On a phone | Needs a sensible height and a narrow layout | Uses the whole screen | Often cramped and hard to close |
| Scrolling | A long form can scroll inside the frame | Normal page scroll | Scrolls inside the layer |
| Can be copied to another site | Yes, unless framing is restricted | The link can be shared anywhere | Tied to your script |
| Best for | A short form that belongs on one page | Email, chat, print and QR codes | A single offer at a chosen moment |
What the frame is doing
An iframe is a window from your page into another page. The form inside keeps its own styles, its own scripts and its own address, and your page cannot read what is typed into it, which is why a form from one service can sit safely inside a site built with another. The price of that separation is that the two pages do not talk. The frame has the size you give it rather than the size of its content, your site's fonts do not reach inside, and scripts on your page do not see the submission. The frame also needs a title attribute that describes it, because a screen reader announces the frame before the form and an untitled frame tells the listener nothing.
Embed, link or popup
An embed suits a short form that belongs to the page around it: an enquiry form under a service description, a booking request on a contact page, a newsletter box at the end of an article. A link suits everywhere a page does not exist, including email, text messages, printed flyers and QR codes, and it is the better choice for long forms because the form gets the whole screen. A popup suits a single offer shown at a chosen moment, and it is the easiest of the three to get wrong, because a layer that covers what somebody was reading gets closed before it is read. Many teams end up using two: the embed on the website and the same form's link everywhere else.
The problems embeds cause
Height is the first. A frame shorter than the form gives it an inner scrollbar, and on a phone a scroll area inside a scrolling page is easy to miss, so the submit button can sit out of reach. Width is the second. A form designed for a full page, with fields side by side, becomes unusable in a narrow column, and accessibility guidance expects content to reflow at a width of 320 CSS pixels without scrolling in two directions. Sign in is the third. Browsers increasingly block cookies inside frames from other sites, so a form that needs the respondent to sign in often behaves badly when embedded and is better sent as a link.
Stopping other sites from framing it
Any page that can be framed can be framed by anybody, not only by you. Copying an embed code onto another site is the mild version. The serious version is clickjacking, where a hostile page frames a real one and disguises it so that people click or type without knowing where. The standard defence is a frame ancestors policy sent by the server, which tells browsers which sites may frame the page at all. Form tools that are designed to be embedded usually offer a softer, form level list of allowed sites instead, which stops casual copying in ordinary browsers but should not be treated as strong security. The two work at different layers and answer different questions: the server policy decides whether a browser will draw the page inside a frame at all, while a form level list decides whether the form agrees to run once it has been drawn there.
Embedding a form from this builder
There is no embed code generator. A published form is a web page, so it goes into your site with an iframe tag written by hand, using the form's link as the source. To keep it from loading elsewhere, set the access type to domain restricted, which is labelled for iframe embedding, and list your site under Allowed Parent Domains; the builder calls this a light safeguard and suggests secret key or login required for private forms. For a narrow column, a classic form in single column layout mode avoids fields side by side, and a conversational form shows one question per screen, which keeps its height steadier. Access settings travel with the published version, so publish after changing them.
Questions people ask
Does an embedded form slow down my page?
It adds a second page load, which matters most when the form is below the fold. Browsers support a loading attribute on iframes, and setting it to lazy defers the form until a visitor scrolls near it. Test the page speed with and without the frame, because a heavy form on your homepage costs every visitor, including the ones who never reach it.
Can my website's CSS style the embedded form?
No. The frame is a separate document, so styles from your page stop at its edge. Style the form in the form tool instead, choosing a theme, palette and font pair close to your site, and check the join on a real page, because a white form inside a cream page is the mismatch people notice first.
Will my site analytics count submissions from the embed?
Not by watching the page, because scripts on your page cannot see inside a frame from another site. Count submissions where they are stored, or send the visitor to a thank you page on your own site after submitting and measure visits to that page. A redirect after submission is the simplest way to get a number your analytics can see.
How tall should the frame be?
Tall enough for the longest state of the form on a phone, including any error messages and the submit button, then check it by filling the form in on a small screen. If that height is absurd for the page, the form is too long to embed and a button linking to it will serve people better than a cramped frame.
Can the same form be embedded on several websites?
Yes, the same frame can go on as many pages as you like, and every submission lands in one set of responses. If framing is restricted to a list of sites, each one has to be on it, including separate hosts such as a shop or a booking subdomain, or the form will refuse to load there.
Is an embedded form less trusted than a link?
Sometimes. A frame shows no address bar of its own, so a cautious visitor cannot see where their answers are going, which matters for payment or health details. Say on the page who hosts the form and what happens to the answers, and for sensitive forms offer the direct link beside the embed.
Make one with forms
The button opens the generator with this use case already described. Change the wording to match your own.
Create a form with OneCraftRelated questions
- What is a domain restricted form?What is a domain restricted form? One that only opens for a listed domain: the respondent's email domain, or the website embedding it. Both kinds compared.
- What is a form theme?What is a form theme? The colours, type and surfaces a form is drawn with, kept apart from its questions. Theme vs template, and the contrast rules to check.
- What is a lead capture form?What is a lead capture form? A form that collects a prospect's details plus a few qualifying answers so sales can follow up well. Lead form vs contact form.
Step by step in the builder: Control who can fill in your form, then Create a conversational form with AI.
Written and checked by the OneCraft team. Last checked .