Jump to content
  • 0

Validate Email Address


Jess147

Question

Hello, I've seen posts before saying that an API is needed to validate an email address. Is there a way to do that without API?

My workflow is simple. I'd like to check if the email address entered by the user is using our domain, for example, @samplejess.com. If the email addressed entered does not match that domain, then the submission will not push thru. How will I do that?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

If you would only like to check for a single domain, '@samplejess.com', this might work for you.

1. Create a Virtual Field - Calc Value that will check if the entered email ends with "@samplejess.com"

CASE
WHEN [@field:Email] LIKE '%@samplejess.com' THEN 1
ELSE 0
END

2. Add a JS code on your DataPage footer to prevent the submission if the value of the Calc Value is 0.

<script type="text/javascript">

document.addEventListener('BeforeFormSubmit', function(event) {

var Input1 = document.querySelector("span[id^='cbParamVirtual1']").innerHTML;


     if (Input1 == 0) {
event.preventDefault();

alert('Enter your Caspio email!');


} else {

document.forms["caspioform"].submit();

}

});
</script>

 

 

Then, hide your calculated value so it will not be displayed on your Submission form. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...