CMS Development

Fab1
Member

Form with empty css value still applies default styling

When embeding forms the default styling is always included even when css: '' is in the create function.

 

ex:

        window.hbspt.forms.create({
          portalId: 'XXXXXX',
          formId: 'XXXXXX',
          target: '#hubspotForm',
          css: '',
        })

will still create a form with the default styling.

0 Upvotes
7 Replies 7
tjoyce
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

Form with empty css value still applies default styling

@Fab1 - Link us to the page your form is on. I suspect your are an HS free account user and the form is in an iframe.

0 Upvotes
Fab1
Member

Form with empty css value still applies default styling

url is here

 

The form is in an iframe but we are not using a free account.

0 Upvotes
tjoyce
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

Form with empty css value still applies default styling

@Fab1 - Your embed code looks right, the only way that form would switch to iframe is if you're on free or basic plans of HS. If you're positive you're not on one of those plans, you might want to contact HS support. If you feel you are on one of those plans, see my answer on this post I answered this morning. 


If this answer helped, please, mark as solved 😄


tim@belch.io | forms.belch.io | Design your own Beautiful HubSpot Forms; No coding necessary.

 

Drop by and say Hi to me on slack.

Fab1
Member

Form with empty css value still applies default styling

We already had forms on our website that I styled successfully before but this morning someone pointed out that our forms were not loading anymore.

 

I had to change the way I was implementing the form creation and since then I'm getting an Iframe back from the hubspot API so the styling can't be overridden.

0 Upvotes
tjoyce
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

Form with empty css value still applies default styling

This may be just a coincidence. About a month ago, HubSpot implemented a fix where you could before include the .js file and successfully circumvent the iframe. They quietly, overnight, implemented a fix to that workaround and removed styling on loads of forms that users implemented this way. It was a pretty populo=ar topic on the API forums as well as here in the Design Forums.

 

What HubSpot plan are you on?

0 Upvotes
Fab1
Member

Form with empty css value still applies default styling

We have a professionnal plan.


I just sent a ticket to HS and I'll try to find some of the topics you are talking about to see if I can see a fix somewhere in there.

0 Upvotes
tjoyce
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

Form with empty css value still applies default styling

@Fab1 - If you're positive the form you are using is from a professional plan then yes, contacting support is your best option.

0 Upvotes