CMS Development

hiscapness
Membre

'Set as raw HTML' form option still includes external CSS on form embed

  • hubspot form is set to 'set as raw HTML' (I have Marketing Hub Enterprise)
  • verified that the form is embedded on page not in an iframe
  • I'm still seeing a ton of included CSS at the top of the external page that contains form-related CSS
  • tried setting 'css: ""' in the form embed to ensure no HubSpot CSS included, does not work
  • WordPress site, but no HubSpot plugin installed in WordPress
  • how can I remove all HubSpot styles, period?
  • tested in Codepen.io by pasting just the embed code from HubSpot into the HTML section, verifying again that the option to 'Set as raw HTML' was checked in the editor
    • Saw this in the source code
    • all the CSS included on the page with nothing but a form embed using raw html optionall the CSS included on the page with nothing but a form embed using raw html option

I stepped through the code in v2.js that is included as part of the embed, and see this:

CleanShot 2023-11-20 at 16.44.04.png

So, no matter what 'isRawlHtmlForm' is set to, CSS is included in the head. AFAIK, NONE of that CSS should be present on the page??? Do I have to manually detect and delete this on page load?

1 Réponse
Jaycee_Lewis
Gestionnaire de communauté
Gestionnaire de communauté

'Set as raw HTML' form option still includes external CSS on form embed

Hi, @hiscapness 👋 I would suggest filing a support ticket. I'd provide them with a link to a page where they can reproduce the issue and the HS-provided embed code you are using. You might position it as wanting to know why the CSS from HubSpot is getting passed along. And not ask them to look at your code specifically. 

 

If you already did that, or if you get looped back here, please let me know, and I'll be happy to dig some more for us.

 

Best,

Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Votes