Preventing personal email address being filled out on form | Community
Skip to main content
Tom_Liolios4
Level 4
Mar 21, 2016 12:32 PM UTC
Question

Preventing personal email address being filled out on form

Hi all,

On several landing pages, I would like to prevent personal email addresses (yahoo, gmail, hotmail etc.) from being filled out on the form.

Initially, I thought I could edit some rules in the form, but this seems to be impossible. I do not want to edit my template, as it would effect all my landing pages.

Does anyone know how to ensure that only on a few landing pages, I "forbid" email addresses containing a certain domain name from being entered?

I found another discussion in the Marketo community referring to a certain HTML script, which should work. Unfortunately, I cannot get it to function properly.

Appreciate all the help!

Thanks,

Tom

16 replies

Chris_Vanderma1
Level 4
Sep 29, 2016 7:46 PM UTC

If anyone can't get this script working like I haven't been able to for the last hour, here is a tip. Make sure the script is after the form in the HTML of the page. That solved it for me.

Translate
Robb_Barrett
Level 10
Mar 23, 2016 1:04 PM UTC

Here's an idea - feel free to shoot it down, but...

You would have to make a change to your template. Where you have your other scripts, put in {{my.Custom-Script}}.

Now, copy the above mentioned code, open up notepad, paste it and save it as restrict-public-email.js. Upload it into design studio and grab the URL.

In the programs you want it, past <script src="<insert URL here>"> into your Custom-Script text token.

Translate
Robb Barrett
Tom_Liolios4
Level 4
Mar 23, 2016 3:12 PM UTC

Thanks Robb. I'll definitely try that one out.

Translate
Justin_Cooperm2
Level 10
Mar 21, 2016 4:08 PM UTC
Tom_Liolios4
Level 4
Mar 21, 2016 4:10 PM UTC

Yes I did! This is the HTML script I tried, but it does not work. Furthermore, the article is about 2 years old, so perhaps outdated?

I'm hoping for new information that could help me.

Thanks,

Tom

Translate
Justin_Cooperm2
Level 10
Mar 21, 2016 4:17 PM UTC

That should still work...is this an embedded form on an external webpage? Or are you using a Marketo landing page?

Translate