Hello,
I’m not a JS expert so I’m looking for some help with an issue that recently came to fruition after updating Cornerstone. Our site uses Salesforce’s Web-to-Lead form on our contact page. I recently updated the page using the Cornerstone builder and a script that I had running in the header of the page is no longer working correctly. The script checks the email field within the Web-to-Lead form to ensure we are not receiving unqualified leads with a gmail, yahoo, hotmail, etc… email address. Any help to get this script working is appreciated.
The page is located here: http://www.streamlinx.com/start-a-conversation/
The script is below:
<script> function checkEmailAddress(){var emailAddress=document.getElementById('email');if(emailAddress.value!=''){var strValue=emailAddress.value;if((strValue.indexOf('gmail')>0)||(strValue.indexOf('yahoo')>0)||(strValue.indexOf('hotmail')>0)||(strValue.indexOf('aol')>0)||(strValue.indexOf('icloud')>0)){alert('Please provide your company or work email address');return false;}}return true;}</script>