Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Script Object Function Email Verification


Level 5

This form uses a script object to hold a function that runs the email verification code. I haven't yet figured out why the the value of EMAILADDRESS is undefined. I want the textfield1 to equal empty (not the word, but a blank space) if the email address doesn't match "". Any ideas? Thanks.*IRbQEypEsbow


2 Replies


Level 10

Hi Greg,

You have a name conflict in your code.  On line 3 of SOemailverification you define a variable EMAILADDRESS but I your code, I think, wants to access the form variable EMAILADDRESS (defined in the form properties).

I think you just need to delete line 3 of SOemailverification.

Also with a RegExp you can specifiy they are case insensitive, so you could use RegExp("^[A-Z0-9_\\-\\.]+\\", "i"), that is with the "i" option in argument two, so you may not need the four RegExp?




Level 5


I tried your ideas, but didn't get them to work. I finally realized I wasn't being specific enough for what the textfield1 should equal. I also changed the function variable name since it was the same as the global variable "EMAILADDRESS". Thank you for your help. The document works correctly now.