APIs & Integrations

JBlake80
Participant

Customising form embed code

I am looking for a way to categorise my Hubspot forms. I have successfully set up tracking in GTM and while I can use URL or Form ID to include/exclude forms, I'm looking for something a little lower maintenance.

 

I noticed that the form ID is currently located in the embed script, however I am wondering if it would be possible to also add a form class?

 

If I were to manually type this in, would it work or would it prevent the form from loading?
Does anyone have any other suggestions how to achieve this?Thanks in advance

0 Upvotes
3 Replies 3
Olivia_Bagnall
Guide | Platinum Partner
Guide | Platinum Partner

Customising form embed code

@JBlake80 You can only customise the embed code of a form that has been set as raw HTML.The raw HTML code can then be plugged onto your site and you can add a css class to apply your own styling. This is the only way to add elements to the form code I am afriad. So if you want to add a class you will also nee dto apply your own styling to a raw form. https://legacydocs.hubspot.com/docs/methods/forms/advanced_form_options


 

Olivia Bagnall
Platinum HubSpot Partner | HubSpot Specialist | Community Champion
BA°SKEY

Book a meeting

If you need further help with anything, please don't hesitate to book a call above


0 Upvotes
Olivia_Bagnall
Guide | Platinum Partner
Guide | Platinum Partner

Customising form embed code

@JBlake80 Hi Jake! 

Have you tested this out yet on a test website page? I think that might be the best way to answer this one. 

I'd llike to see if @Tom has any insight too? 

Olivia Bagnall
Platinum HubSpot Partner | HubSpot Specialist | Community Champion
BA°SKEY

Book a meeting

If you need further help with anything, please don't hesitate to book a call above


JBlake80
Participant

Customising form embed code

I have tested it out and although the form works I can't actually see any
of the additional data that I have tried to put in.

do you know how to assign a form class using the embed code?
0 Upvotes