Custom CSS for Lead Form


I'm working to add custom CSS styling to a HubSpot lead form embedded in a wordpress landing page (


The page:


'If you need to style or target a HubSpot form based on it's form ID we recommend targeting the .hs-form-[id] class." 


I find, however, that every load of the page generates a different ID of the lead form.  
How can custom CSS be specified based on it's form ID when it's changing on every load? 




0 Avaliação positiva
1 Resposta 1
HubSpot Produkt-Team
HubSpot Produkt-Team

Hey @jfd118  the ID of your form will update on page load, however there is a specific class which targets the form based on it's HubSpot form ID. 

This is "hs-form-FORMID" 


So you will find the form ID in the URL when you're looking on the form in the HubSpot forms editor, or you will see it via inspecting the source of your page with the form on it. 



Please note however, styling forms with an external stylesheet is only available when "set as raw html form" is enabled in the styling section on a form. This is only available to Pro and enterprise level marketing Hub subscriptions. 


0 Avaliação positiva