I’m having trouble with iframe height settings when embedding HubSpot forms into SharePoint web parts. The form only displays completely when I configure the height to 200%, which feels like an odd workaround. At 100% height, the bottom portion of the form gets cut off and users can’t see all the fields. The real problem happens when users resize their browser window - the iframe doesn’t adjust properly and important elements like submit buttons disappear since there’s no scrollbar. I’ve also noticed that adding custom JavaScript to embedded web parts seems to be restricted. Has anyone found a better solution for this iframe height problem?
That iframe resizing issue is super common with HubSpot forms in SharePoint. Don’t bother with height percentages - they’re a pain. Use the HubSpot Forms API instead to dynamically adjust the iframe height based on what’s actually in the form. Just add an onFormReady callback that measures the rendered height and updates the iframe. This fixed my scrollbar issues and made the forms actually responsive on different screens. The callback runs after everything loads, so you get the right measurements every time. SharePoint blocks some JavaScript, but HubSpot’s API methods usually work fine since they stay within the iframe.
Try adding scrolling=“yes” to your iframe - that usually fixes cutoff issues. SharePoint loves to override iframe scroll settings by default, which clips forms. Also, HubSpot has a data-loading attribute that preloads form dimensions. Worth a shot if ur still getting weird sizing.
Had the same problem with HubSpot forms in SharePoint. Fixed pixel heights work way better than percentages - I start with 600px and tweak from there. For the responsive issues, ditch the iframe and drop the HubSpot embed code straight into a Script Editor web part. The form renders natively and handles browser resizing without breaking. Also check if your SharePoint site has custom CSS messing with iframe dimensions. I’ve seen site breakpoints screw up embedded content sizing before.
try using min-height instead of height percentage in ur iframe code. fixed the same cutoff issue for me with forms. also check if ur SharePoint theme’s messing with the iframe sizing - custom CSS from the site can interfere with embedded content.