🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!
Guides & Tutorials October 22, 2026

How to Embed a Gravity Forms Form on Webflow, Shopify or Any Non-WordPress Site

GravityExtra
How to Embed a Gravity Forms Form on Webflow, Shopify or Any Non-WordPress Site

You built a form in Gravity Forms and now you need it on a page that is not WordPress. Maybe the marketing site is on Webflow, the shop on Shopify, the portfolio on Squarespace, the docs on a static site generator, or a landing page lives on a tool that only lets you paste a snippet. The form has the fields, the logic and the payment setup you want, and rebuilding it somewhere else would mean two forms, two sets of entries and two things to keep up to date. This article shows how to show one Gravity Forms form on any website, what goes wrong with a plain iframe, and how to do it safely.

Why a Form Does Not Simply Move to Another Website

A Gravity Forms form is more than markup. Its scripts talk to your WordPress site to validate fields, upload files, apply conditional logic and send the entry. Its security tokens belong to your site. Its styles and its payment and CAPTCHA keys are tied to your domain. If you copy the HTML to another platform, the form looks right and then does nothing. The only reliable way to reuse the form is to leave it on your WordPress site and show it on the other website through a frame.

That is a sound idea, and people have done it for years with an iframe tag. The trouble starts with the details.

What Goes Wrong With a Plain Iframe

  • The height is fixed. A form grows when a conditional field appears, when an error message is shown and when the next page of a multi-page form opens. A fixed height means a scroll bar inside the form, or a big empty gap under it.
  • The page does not scroll. When a visitor presses Next on a long page, the new step appears but the page stays where it was, and the visitor lands in the middle of the form. After a failed validation the error may be hidden above the part of the page they are looking at.
  • Anyone can frame your form. Without a policy, any website can show your form, collect your visitors and make it look like part of their page.
  • The host page learns nothing. You cannot fire a conversion tag when the form is sent, because the form is in another document.
  • Redirects break. A thank you page opens inside the small frame, with the menu and the footer of your site squeezed into it.
  • Pre-filling is awkward. You have to build the address by hand for every page.

The Way It Works With Remote Embed

The Gravity Forms Remote Embed Premium Add-on keeps the form on your site and adds the missing parts. For every form you can allow remote embedding, list the websites that may show it, and copy a snippet. The snippet is a single script tag. The script is small and has no dependencies. It creates the iframe, and it listens to messages from the form page that tell it how tall the form is.

A studio website that is not WordPress with a heading, a short text and a Gravity Forms visit request form inside a card, and a footer line below it
A plain website page with a Gravity Forms form in the middle. The heading and the footer belong to the other site.

The page inside the frame is a bare version of the form: no theme header, no sidebar, no footer, just the form with the Gravity Forms theme framework styles. It sends its height to the loader when it loads and whenever it changes, so the frame is always exactly as tall as the form. It tells the loader when to scroll, when the form was sent and where to go next.

Step by Step: Put a Form on a Non-WordPress Site

  1. Install the add-on on the WordPress site that holds the form and activate your license key.
  2. Open the form, then Settings, then Remote Embed. Turn on Allow remote embedding.
  3. Type the address of the website that will show the form. Use the address exactly as the browser shows it, for example https://www.yourstore.com. Save.
  4. Copy the script from the Embed code panel.
  5. In the other website, open the page and add an embed or custom code block where the form should appear, then paste the script.
  6. Publish and open the page.

Each website builder has its own name for the block. In Webflow it is the Embed element, in Shopify a Custom Liquid section or a custom HTML block, in Squarespace a Code block, and in a hand-written page you paste the line into the HTML where you want the form. The script has to run on the page, so choose a block that allows scripts. If the platform refuses scripts, use the plain iframe from the same panel and give it a fixed height.

The Embed code panel with the script snippet and the plain iframe snippet, each with a copy button, and a note about caches
The embed code panel: a script snippet and a plain iframe, ready to copy.

Making It Safe: Allow Lists and Frame Ancestors

The most important part of embedding is deciding who may do it. The add-on answers this with an allow list per form. You list the exact origins that may show the form, and optionally a wildcard for sub-domains, for example https://*.yourstore.com. The list is sent to the browser in a Content-Security-Policy header with the frame-ancestors directive. A browser that is asked to show your form inside a page that is not on the list refuses to do it, so copying the snippet to another site gives them an empty box.

The server checks too. The loader tells the server which origin it runs on, and the server answers with a 403 and no form content when that origin is not on the list, when embedding is off for the form, when the form does not exist, and when the form is inactive or in the trash. The answer is the same in all those cases, so nobody can discover which form numbers you have. The answer to a refused request cannot itself be shown in a frame.

Embedding is off by default on every form, so installing the add-on changes nothing until you decide to share a form. The older X-Frame-Options header is sent only where it is compatible, which is when no outside site is allowed, because it cannot list several sites. Otherwise it is left out, and a copy sent by another plugin on the page is removed so it cannot block your allowed sites.

Auto-Resize and Scroll, the Part That Makes It Feel Native

The messages between the frame and the loader are the heart of the experience. The form page reports its height when it loads, when the window is resized, when a conditional field shows or hides, when a validation message appears, when a new page opens and when the confirmation is shown. The loader only believes a message that comes from the iframe it created and from the WordPress site that served the script. It checks the number before it sets the height.

A multi-page Gravity Forms form inside another website with the steps bar, an error message on the second page and the Back and Next buttons
A multi-page form on the other site: the frame is as tall as the form, and the page was scrolled back to the top of the frame.

After a page change, a validation error or a confirmation, the loader scrolls the host page back to the top of the form if the top is out of view. Without that, a visitor who presses Next near the bottom of a tall step would land halfway down the next step. You can turn the scrolling off or leave room for a fixed header with one attribute each.

Confirmations, Redirects and Analytics

A text confirmation shows in the frame and the frame shrinks to fit it. A redirect confirmation has two modes. Inside the frame is the usual behavior. Move the whole page sends the visitor of the host page to the new address, so your thank you page opens in the full window and not in a small box. The loader follows only addresses that start with http or https.

If you track conversions, turn on the submit event. The loader then fires a gfre:submit event on the host page, and with one attribute it also pushes gfre_submit to the Google Tag Manager data layer. That lets you send a Google Analytics or Meta event when the form is sent, even though the form lives in another document.

Pre-Filled Fields, Save and Continue, Uploads and Payments

To pre-fill a field, set it to be populated dynamically in Gravity Forms with a parameter name, then add the value to the script with a data-param attribute or ask the loader to copy a query value of the host page. Only the names you list are passed on. A visitor cannot add other parameters to the address of the host page and have them reach the form.

A Save and Continue link points back to the page that holds the form. The loader hands the token to the form when the visitor returns, and the draft comes back. File uploads work inside the frame. The keys of your CAPTCHA and payment add-ons work because the frame is a page of your own domain, and the frame is allowed to use the payment features of the browser. The entry records the address of the host page as its source.

Caching, Hosting and Other Practical Notes

Do not cache the form page. The add-on sends headers that forbid caching, and most cache plugins obey them, but some hosts cache pages before WordPress runs. Add an exclusion for every address that contains gfre_form in your cache plugin and in any CDN. The loader script itself is a plain file and may be cached.

A form that requires a login works on a page of your own site, but not on another website, because browsers do not send your login cookie to a frame that sits on a different site. If you need members only forms on other sites, use a different approach. For everything else, the visitor does not need to be logged in and the frame works for any browser that allows normal frames.

A Short Checklist Before You Publish

  • Embedding is on for the form and the right websites are on the list, with the exact scheme, host and port.
  • The form page opens in a private window on the other site, without scroll bars inside the form.
  • A multi-page form scrolls to the top of the form when you press Next, and an error shows at the top.
  • The confirmation looks right and the redirect, if any, opens the right page.
  • A test entry arrives in Gravity Forms with the other page as its source.
  • Your cache and CDN do not cache the form page.

Frequently Asked Questions

Can I use a Gravity Forms form on Webflow, Shopify or Squarespace?

Yes. Leave the form on your WordPress site, turn on remote embedding for it, add the address of the other site to the list and paste the script into an embed or custom code block of the other page.

Does it work without scripts?

Yes, with the plain iframe. You choose a fixed height, and the form works the same, but it cannot resize itself or scroll the page.

Can someone else show my form on their site?

Not unless you list their address. The browser itself refuses to show the form in a page that is not allowed.

Do payments, file uploads and conditional logic work?

Conditional logic, file uploads, multi-page forms, Save and Continue and AJAX submits are tested inside the frame. Payment and CAPTCHA add-ons run on your own domain inside the frame, so their keys work as usual.

Will my entries still arrive in WordPress?

Yes. The form is submitted to your site, so entries, notifications and feeds work exactly as before.

Remote Embed turns a WordPress-only form into a form you can place anywhere you can paste a line of code, without a second form to maintain and without opening it to every website on the internet.

See the Remote Embed add-on

0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $39.00/yr
Bundle Special Price: $23.40/yr