Embed on your website
Put a dForms form inside your own website. Copy the snippet from the Embed dialog, paste it into WordPress, Webflow or plain HTML, and let the script size the frame, bring each new screen into view, r
Instead of sending people away to a Dapta link, you can run the form inside one of your own pages. The embed shows the same published form, collects the same submissions and triggers the same integrations.
Step 1: Open the form in the editor and click the Embed icon (the angle brackets) in the topbar, between Edit link and QR code.
Step 2: The dialog Embed this form on your site appears with a ready made snippet. Click Copy snippet. The button turns into Copied.

The snippet has two parts: an iframe that loads your form, and a small script, embed.js, that looks after the frame from your page.
?embed=1
Tells the form it is running inside a page, so it renders at the height of its content instead of filling a whole screen, and reports that height to your page.
data-dapta-forms
The mark the script looks for. Keep it: without it the script ignores the frame, so there is no resizing, no scrolling into view and no page details.
title
The form name, read out by screen readers. Change it if you want different wording.
width:100%
The form takes the width of whatever you put it in, so it stays responsive.
min-height:480px
The height it starts at, and the smallest it ever gets.
embed.js
Resizes the frame, brings each new screen into view, carries out the ending redirect and tells the form which page it is on. One copy of the script handles every form on the page.
⚠️ Note: Paste both lines, and load
embed.jsfrom the address the snippet gives you. A copy of the script saved on your own server still resizes the frame and carries out the redirect, but it never passes your page's details to the form.
Step 3: Paste the snippet into your page, wherever the form should appear.
WordPress: edit the page, add a Custom HTML block and paste the snippet inside it. In the classic editor, switch from Visual to Text first.
Webflow: drag an Embed element onto the canvas, paste the snippet into the code editor and publish the site.
Plain HTML, or any other builder: paste it into the body of your page, inside the container that should hold the form.
If your builder splits code into "head" and "body" boxes, both lines can go in the body box, one after the other.
Step 4: Load the page and answer the first question to check it. The form should sit flush inside your layout with no scrollbar of its own. Then send a test response and open it in Submissions: the Page row should show your page.

The height takes care of itself
Questions are not all the same size: a four option question is taller than a single email field. Every time the content changes, the form reports its new height and embed.js resizes the frame, so the page grows and shrinks with it and the visitor never scrolls inside a box. After the last answer, the frame shrinks to fit the ending.
The frame is fluid, so a narrow column gets a narrow form:

💡 Tip: You can embed several forms on one page. Add the
iframeline for each of them and keep a singleembed.jsline: each frame is looked after on its own.
The form scrolls into view
When the form replaces its whole screen, the new screen starts at the top of the frame. On a long page the visitor may still be scrolled down to where they pressed the button, so embed.js scrolls your page back to the top of the form.
It happens every time a Slides form changes screen, and when either layout switches to the sending, reveal, booking or ending screen.
It only scrolls when the top of the form is off screen. A visitor who can already see it is not moved.
The scroll is smooth, or instant for visitors whose device asks for reduced motion.
It never happens when the page loads.
Where the redirect goes
When the ending screen redirects to another page, an embedded form opens that page in the whole browser tab, replacing your page, just like a normal link. This is what lets checkout pages that refuse to run inside a frame work from an embed.
With
embed.json the page, your page carries out the redirect.Without it, the form redirects the whole tab on its own.
One setup cannot redirect at all: an iframe with a
sandboxattribute that does not includeallow-top-navigation, on a page withoutembed.js. If your site builder sandboxes iframes, keep the script on the page.
What your page tells the form
A form inside an iframe cannot see the page around it: that page's address, title and cookies belong to your site. embed.js runs on your page, so the form asks it, once when it loads and again every time it saves answers. The script answers with:
Page address
The full URL of your page, including its query string.
Page title
The title of your page, as the browser tab shows it.
HubSpot page and portal
The HubSpot page ID and portal ID, when your page runs HubSpot.
HubSpot cookie
The visitor's hubspotutk cookie, when your page runs the HubSpot tracking code.
Nothing travels the other way: your page never receives what the visitor types.
What the form does with it:
The page is saved with the submission. It shows as the Page row when you open a response in Submissions, as the Page URL column of the CSV export and as the
visitobject of the webhook payload.The UTMs of your page count. If the iframe
srchas noutm_parameters, the ones on your page's address are saved with the submission, all of them together. If thesrccarries anyutm_parameter, those win and the ones on your page are ignored.HubSpot can link the visit. With the cookie, HubSpot links the submission to the visitor's earlier page views. What you need for that is in Landing page & HubSpot attribution.
A few rules keep it to your own form:
The script only answers iframes marked
data-dapta-formswhosesrcis on the same address the script was loaded from. The snippet already does this.Add
data-dapta-forms-context="off"to the iframe to send nothing about your page for that form.A visitor who opted out of HubSpot tracking (an
__hs_opt_outor__hs_do_not_trackcookie) keeps the HubSpot cookie out. The page address and title still go.The script reads cookies. It never writes one.
With the iframe alone and no embed.js, nobody answers. The form waits a fraction of a second, then saves only what the browser reports as the referring page, usually just your site's domain, with no UTMs from your page and no cookie.
Good to know
The embed always shows the published version. Edits you have not published yet stay in your draft.
Submissions from an embed are ordinary submissions: same Submissions table, same Analytics, same integrations and emails.
If you turn a cover screen on, it shows inside the embed too. For a form that has to feel like part of the page, leave the cover off and start on the first question.
Snippets you pasted earlier keep working, including ones with an older link. If you pasted only the
iframeline, add theembed.jsline.To force the language of the form inside the embed, add
&lang=esor&lang=ento the iframesrc. See Language & button text.With spam protection on, the check runs inside the frame. There is nothing to set up on your site.
Tracking IDs set on the form (GTM, Meta Pixel) load and fire inside the frame, not on your page. See Tracking & pixels.
What's next
Your public link: the plain link, for emails, chats and buttons.
Landing page & HubSpot attribution: link embedded submissions to the visitor's earlier page views in HubSpot.
Cover screen & banner: decide what the first screen shows.
Tracking & pixels: measure the embedded form alongside the rest of your site.
Analytics: views, starts and drop-off, wherever the form is running.
Last updated