Quantcast
Channel: Sam's Activities
Viewing all articles
Browse latest Browse all 3363

Duplicate Validation for Portal Form

$
0
0

Hi,

I am trying to add validations for a field in the web forms where it shouldn't allow email address duplication in the system. I am not sure how to add the validation. Can someone help me with this?

//Email Validator
            var emailValidator = document.createElement('span');
            emailValidator.style.display = "none";
            emailValidator.id = "emailaddressValidator";
            emailValidator.controltovalidate = "emailaddress1";
            emailValidator.errormessage = "<a href='#emailaddress1_label'>The email you have entered is already in the system. PLease enter a different email address.</a>";
			emailValidator.validationGroup = ""; // Set this if you have set ValidationGroup on the form
            emailValidator.initialvalue = "";
            emailValidator.evaluationfunction = function() {
                // only require email address if preferred contact method is email.
                if ($("#emailaddress1").val() == (NOT SURE HOW TO READ CRM DATA IN HERE)) {
                    return false;
                } else {
                    return true;
                }
            };

Viewing all articles
Browse latest Browse all 3363

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>