Fix the GoHighLevel form sometimes not appearing on /contact/
form_embed.js hides each embed off-screen until the iframe reports ready. With loading="lazy" the hidden iframe often never loaded, so it never reported ready and the form stayed invisible. Load the form eagerly, reserve its height, and reveal any embed still hidden after a few seconds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -263,6 +263,6 @@ ${scripts}
|
||||
// GoHighLevel embeds. form_embed.js resizes the iframes to their content.
|
||||
export const GHL_SCRIPT = '<script src="https://link.msgsndr.com/js/form_embed.js" defer></script>';
|
||||
export const ghlForm = (id, name) =>
|
||||
`<iframe class="ghl-frame" src="https://api.leadconnectorhq.com/widget/form/${id}" id="inline-${id}" title="${name}" data-layout="{'id':'INLINE'}" data-trigger-type="alwaysShow" data-trigger-value="" data-activation-type="alwaysActivated" data-activation-value="" data-deactivation-type="neverDeactivate" data-deactivation-value="" data-form-name="${name}" data-layout-iframe-id="inline-${id}" data-form-id="${id}" loading="lazy"></iframe>`;
|
||||
`<iframe class="ghl-frame" src="https://api.leadconnectorhq.com/widget/form/${id}" id="inline-${id}" title="${name}" data-layout="{'id':'INLINE'}" data-trigger-type="alwaysShow" data-trigger-value="" data-activation-type="alwaysActivated" data-activation-value="" data-deactivation-type="neverDeactivate" data-deactivation-value="" data-form-name="${name}" data-layout-iframe-id="inline-${id}" data-form-id="${id}"></iframe>`;
|
||||
export const ghlCalendar = (id, title) =>
|
||||
`<iframe class="ghl-frame ghl-cal" src="https://api.leadconnectorhq.com/widget/booking/${id}" id="${id}_cal" title="${title}" scrolling="no"></iframe>`;
|
||||
|
||||
Reference in New Issue
Block a user