Blocked domains in form embed


#1

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”]


#2

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


#3

Hi @Osman_Sheikh,

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


#4

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-validation/24147/2

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


#6

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.


#7

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!


#8

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!


blockedDomains attribute doesn't work
#9

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


#10

Yes @Connor_Barley that's right!