APIs & Integrations

Osman_Sheikh
Member

Blocked domains in form embed

I tried this code to block domains on a form embed, but it’s not working. Any ideas why?
blockedDomains: [“domain1.com”, “domain2.com”, “domain3.com”]

0 Upvotes
8 Replies 8
cbarley
HubSpot Alumni
HubSpot Alumni

Blocked domains in form embed

Hey @fred_a @Osman_Sheikh, looks like this was a bug on our end that Engineering pushed out a fix for. Can you double check to see that this attribute works?

Thanks!

0 Upvotes
fred_a
Member

Blocked domains in form embed

Thanks @Connor_Barley that works now! Be careful because if we put the domains in the Code + in the form, it makes another bug that don't display the form.. I had to update all my forms after your update (by removing the domains in every forms).. Thanks again!

0 Upvotes
cbarley
HubSpot Alumni
HubSpot Alumni

Blocked domains in form embed

hey @fred_a, thanks for that info! So to confirm what you're saying is that inside the Forms tool you had blocked some domains, and inside your form embed code you'd also used the blockedDomains attribute, such that this caused an issue? I'd like to try reproducing the issue myself

0 Upvotes
fred_a
Member

Blocked domains in form embed

Yes @Connor_Barley that's right!

0 Upvotes
cbarley
HubSpot Alumni
HubSpot Alumni

Blocked domains in form embed

hey all, as an update, I'm speaking currently with our dev team. They're investigating the issue now. Will reach out with more info asap.

0 Upvotes
fred_a
Member

Blocked domains in form embed

Hi Osman, same pb for me. Did you find a solution?

0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

Blocked domains in form embed

Hi @Osman_Sheikh,

I'm going to copy @Connor_Barley on this, as he's digging in on @fred_a's similar topic here.

Isaac Takushi

Associate Certification Manager
0 Upvotes
cbarley
HubSpot Alumni
HubSpot Alumni

Blocked domains in form embed

Thanks for consolidating here @Isaac_Takushi,

Apologies for the delay @fred_a. I did some testing with this property and was unable to get the blockedDomains attribute to work for me. I'm going to be reaching out internally to see if there was an update to the form embed code recently.

In the interim, you could write validation client side with jQuery inside the form as per these documents: https://www.sitepoint.com/community/t/how-can-i-exclude-block-yahoo-com-domain-during-jquery-form-va...

I'll let you know what I find on the HubSpot side of things.

0 Upvotes