Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Embedded form success message not visible: how to fix it

CNV-356Medium impactDetectedBy FunnelGuardPublished Updated
On this page

What this issue is

An iframe is a window that shows another website's page inside yours. Form tools such as HubSpot, Typeform, Jotform and many CRMs offer embed codes that use one. The form, the submit button and the success message all live inside the frame.

Your page (the parent) cannot see inside a frame from another domain. Browsers block it on purpose. So after a visitor submits, three things can go wrong: the success message appears but is hidden because the frame is too short, the message never appears at all, or it appears inside the frame while the rest of your page looks unchanged and gives no sign of success.

Where the journey breaks
  1. Page loadsEmbed iframe renders
  2. Visitor submitsLead reaches the provider
  3. Success messageHidden or not shown in the frame
  4. Parent page reactsNo redirect, no event
  5. Conversion tagNever fires

The form submits, but the visitor and the parent page never see the confirmation.

Why it costs you leads or sales

Visitors who see no confirmation assume the form failed. Some submit again, which creates duplicate leads. Others leave and go to a competitor. Your team may also get a lead and still lose the chance to follow up well, because the visitor never saw what happens next.

There is a reporting cost too. If your ad conversion tag depends on a thank-you page or an event on the parent page, it never fires. Google Ads and Meta then see fewer conversions than you really got, and bidding learns from bad data.

Submissions versus conversions recordedExample numbers
Submissions versus conversions recorded (example)Real form submissions: 100 count; Conversions in ad platform: 0 count; Duplicate re-submits: 18 count03877100018Real form submissionsConversions in ad pla…Duplicate re-submitscount

Example: 100 real submissions in a week, with the success message and the conversion event both lost to the iframe.

How to check if your site has it

Test the form like a visitor
  1. Open the page in a private window

    Use a fresh session so cookies and saved form data do not change what you see. Test on desktop and on a phone.

  2. Submit a test lead

    Use a clearly marked test name and email. Watch the area where the form was.

  3. Look for a visible confirmation

    You should see a thank-you message or be sent to a thank-you page. If the frame just goes blank, stays the same or shows a sliver of text, the issue is present.

  4. Check the frame height

    Right-click the form, choose Inspect, and find the iframe element. A fixed height attribute such as height="500" is a common cause when the message is taller or shorter than the form.

  5. Check for a parent-page event

    Open the Network tab and your tag debugger (for example Google Tag Manager Preview). After submit, see whether any event or conversion hit fires from the parent page.

How to fix it

Pick the approach your form provider supports. In order of reliability: redirect to a thank-you page, send a message from the frame to the parent, or at minimum let the frame grow so the built-in message is visible.

Fix options for embedded form confirmation
OptionWhat it doesBest when
Redirect after submitSends the visitor to a thank-you page on your siteThe provider has a redirect URL setting. Also gives you a clean conversion URL.
postMessage to parentFrame tells your page the form was sentYou want to show your own message or fire a tag without leaving the page
Auto-resize frameFrame height follows its contentYou keep the provider's built-in message
Replace the iframe with the provider's script embedForm renders directly in your pageThe provider offers it and your theme allows scripts
Parent page: listen for a submit message and show your own confirmationjavascript
window.addEventListener('message', function (event) {
  // Only trust your form provider's origin. Replace with the real one.
  if (event.origin !== 'https://forms.example-provider.com') return;

  // The message shape depends on the provider. Check its docs.
  if (event.data && event.data.type === 'form-submitted') {
    var frame = document.getElementById('lead-form-frame');
    var msg = document.getElementById('form-success');
    if (frame) frame.style.display = 'none';
    if (msg) msg.style.display = 'block';

    window.dataLayer = window.dataLayer || [];
    window.dataLayer.push({ event: 'lead_form_submitted' });
  }
});
Markup that goes with the listenerhtml
<iframe id="lead-form-frame" src="https://forms.example-provider.com/your-form" title="Contact form" style="width:100%;min-height:600px;border:0"></iframe>
<div id="form-success" style="display:none" role="status">
  Thanks, we have your message and will reply within one working day.
</div>
Where to make the change
  1. Set a redirect in the form tool

    In the provider's form settings, find the option after submit (often called Redirect URL or Thank you page) and point it at a WordPress page.

  2. Add the listener

    Paste the script into a Custom HTML block under the embed, or use a header and footer scripts plugin. Give the iframe the id used in the script.

  3. Increase the frame height

    In the Custom HTML block, replace a fixed height with min-height, such as min-height:600px.

Visitor experience

Before

  • Visitor clicks submit and the frame looks unchanged or cut off
  • No thank-you message on your page
  • Conversion tag never fires
  • Visitor submits again or leaves

After

  • Clear thank-you message or thank-you page appears
  • Parent page gets a submit signal
  • Conversion tag fires once
  • Visitor knows what happens next

How to confirm it's fixed

Fix verification
  • Submit a test lead on desktop and mobile and see a visible confirmation
  • The message is fully readable, not cut off by the frame
  • The lead arrives in the inbox or CRM once, with no duplicates
  • Your tag debugger shows the conversion event firing on submit
  • The event does not fire when the form is submitted with errors
  • The thank-you page, if used, loads the full page and not a nested copy of your site

How to prevent it happening again

Embeds change without you touching your site. The provider can update the form's markup, change its message format or alter what it sends to the parent. A theme update can also replace your custom HTML. Retest after any change to the form, the page or the provider settings.

Habits that help
  • Prefer a redirect to a thank-you page you control
  • Use min-height or an auto-resize script instead of a fixed height
  • Keep the listener and markup in one place, with a comment saying which provider it expects
  • Retest after provider updates, theme changes and page rebuilds
  • Run the journey on a schedule rather than relying on someone remembering to test

How FunnelGuard handles this

FunnelGuard detects this issue today. A robot visitor opens your page, fills in and submits the embedded form, then runs a frame assertion: it looks inside the iframe for the success state and checks the result is actually visible after submit. If it is missing or hidden, the step fails.

A failure is re-checked from a second region before one alert goes out, with a screenshot and a likely cause, by email, Slack, Teams, WhatsApp, webhook or PagerDuty. FunnelGuard also checks the tracking hits sent to ad and analytics platforms and whether test leads reach your inbox and CRM. Test traffic is marked (utm_source=funnelguard, fg_test=1, an fg_test cookie and its own user agent) and it never bypasses CAPTCHAs or bot protection.

The Free plan covers 1 site and 2 journeys with daily checks and no card. Paid plans start at $39/month with a 3-day free trial, and a free read-only website audit is available.

Questions people ask

Why is my embedded form not showing a thank-you message?

The message usually appears inside the iframe, which may be too short to show it, or the provider may not show one at all. Check the iframe's height and the form's after-submit setting. Setting a redirect or a postMessage listener makes the confirmation reliable.

How does a parent page know an iframe form was submitted?

Browsers stop the parent reading a cross-domain frame, so the form provider has to tell it. Most send a message with window.postMessage, which your page receives with a message event listener. Check the provider's docs for the exact message and always verify event.origin.

How do I redirect to a thank-you page after an embedded form submit?

Use the provider's redirect or thank-you URL setting in the form's options. Make sure it redirects the top window, not just the frame, or your page will load nested inside the iframe. If the provider cannot do that, use a postMessage listener and set window.top.location.

Why is my iframe form cut off after clicking submit?

The iframe has a fixed height, and the success message or error text is taller than the space. Use min-height instead, or an auto-resize script from your provider that updates the frame height as content changes. Check mobile too, where text wraps and runs longer.

Why is my conversion not tracked when the form is in an iframe?

Your tag on the parent page cannot see events inside the frame. Unless the provider sends a message or redirects to a thank-you page, there is nothing for the tag to trigger on. Push a dataLayer event from a message listener or track the thank-you page URL.

Is it safe to listen for postMessage from an iframe?

Yes, if you check event.origin against your form provider's exact domain and ignore all other messages. Without that check, any site could send a fake submit message and trigger your conversion tag or success state.

How can I test an embedded form success message automatically?

Run the journey on a schedule with a tool that can enter the iframe, submit a test lead and check the success state. FunnelGuard does this with a frame assertion and alerts you with a screenshot if the message is missing.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

How: frame assert.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.