").html("").text());$("#phonenumberid").val();$("#enquirysubmitid").click(function(){var r=$("#fullname").val(),e=$("#email").val(),u=$("#phonenumberid").val(),h=$("#commentsid").val(),c=document.getElementById("fullname-error-msg"),l=document.getElementById("email-error-msg"),a=document.getElementById("phonenumber-error-msg"),f=document.getElementById("email-valid-error-msg"),o=document.getElementById("email"),s;if(c.innerText=r===""?"First name is required.":"",l.innerText=e===""?"Email is required.":"",a.innerText=u===""?"Phone number is required.":"",r!==""&&e!==""&&u!==""){const o=document.getElementById("email"),e=o.value;if(f=document.getElementById("email-valid-error-msg"),o.checkValidity())f.innerText="";else{f.innerText="Please enter a valid email address.";return}s={fullname:r,email:e,phonenumber:u,comments:h,productId:898};$.ajax({cache:!1,type:"Post",url:"/DueDiligenceDownload/SavePropertyEnquiry",data:s,success:function(r){r.success==!0?(displayBarNotification("Your enquiry is submitted successfully.","success",36e3),n!=""?$("#fullname").val(""):$("#fullname").val(""),console.log(t),t!=""?$("#email").val($("
").html("").text()):$("#email").val(""),i!=""?$("#phonenumberid").val():$("#phonenumberid").val(""),$("#commentsid").val("")):displayBarNotification("Your enquiry is not submitted successfully, please try again.","error",36e3)},error:function(){alert("Something went wrong, please try again.")}})}})});$("#email").change(function(){validateEmail()})