blockedDomains attribute doesn't work


#1

Hi

I'm trying to block some domains. The form display well but doesn't block anything... Could you please tell me what's wrong with this code?

hbspt.forms.create({
portalId: "xxxxxx",
formId: "xxxxxxxxxxxx",
css: "",
blockedDomains: ["domain1.com", "domain2.com"],
translations: {
en: {
required: "Please fill the required field.",
missingSelect: "Please select an option.",
forbiddenEmailDomain: "Please enter your business address",
manuallyBlockedEmailDomain: "Please enter your business address",
submitText: "WATCH NOW"
}
}
});

Thanks


Blocked domains in form embed
#2

Hi @fred_a, looking at David's response on this thread, does removing the space between blocked domains help fix the issue?


#3

Thanks for your help @Connor_Barley! I tried ["domain1.com","domain2.com"] and "domain1.com,domain2.com" (without spaces) but it still doesn't work..


#4

Hi @fred_a,

I tested this a bunch in my own portal and it wasn't working at first. I then slowly deleted and re-added elements of your code. This code you sent over, and the code I used here in my portal seemed to work, but then it stopped working again. I'm going to have to keep digging into this one and update you when I have a solid answer.


#5

ok, strange... Thanks @Connor_Barley!


#6

Hi @fred_a, Engineering has pushed out a fix for this issue. Can you check to see if you're able to use that parameter now?


#8

Thanks @Connor_Barley I replied in this topic: Blocked domains in form embed


#9