Inline embed
IFrame embed code
Add this code where the form should appear:
<!-- Start Surface Form Embed -->
<iframe
src="REPLACE ME WITH FORM URL"
allowfullscreen
loading="eager"
fetchpriority="high"
>
</iframe>
<!-- End of Surface Form Embed -->
Replace REPLACE ME WITH FORM URL with your form URL. Click Share in the
form's Overview section to find it.
Optimize speed
Add the following <link> tags inside the <head> of your site:
<!-- Speed up connections to forms.withsurface.com by performing early DNS resolution and TCP handshake -->
<link rel="dns-prefetch" href="https://forms.withsurface.com">
<link rel="preconnect" href="https://forms.withsurface.com" crossorigin>
<!-- Fetch the form in advance, so it's ready when a user opens it. -->
<link rel="prefetch" href="REPLACE ME WITH FORM URL" as="document">
Explanation
- dns-prefetch → Resolves the domain early to skip DNS lookup delays.
- preconnect → Prepares the TCP + TLS handshake so the browser is ready to request assets immediately.
- prefetch → Fetches the form in advance, so it's ready when a user opens it.
Where to paste it
The iframe is the same everywhere. Only where it goes changes.
Webflow
Add a div at the size you want the form, then drop a Code Embed block inside it and paste the iframe. Code Embed is a paid-plan feature.
Framer
Insert → Embed component. Place it, then in the component's
Properties set Type to URL and paste your form URL.
WordPress
In the block editor, + → Custom HTML, paste the iframe, and
Update. Adjust the height in the style attribute to fit your form.
On the Classic editor, use the Text tab.
Next.js
Drop the <iframe> straight into the component where the form should
appear. No script needed for inline.
React
Same idea: the <iframe> goes in the component. Remember React wants
frameBorder and allowFullScreen in camelCase.
Unbounce
Add a Custom HTML component to the page and paste the iframe into it.
HTML
Paste it wherever the form should appear.