/
var
/
www
/
html
/
stengineers
/
Upload FileeE
HOME
<?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); $pagetitle = "ST Engineers - Contact Us"; require 'header.php'; ?> <!--Start Page Header--> <section class="contact-banner"> <div class="d-flex flex-column align-items-center"> <div class="page-header__inner text-center"> <h1>Contact Us</h1> </div> </div> </section> <!--End Page Header--> <!-- Start Form/Address --> <section class="address-sec"> <div class="container"> <div class="row" style="margin:0 0;"> <div class="col-lg-5 contact-content mt-5"> <h5>Reach out to us</h5> <div class="contactdiv"> <span class="contactdiv1">Tel :</span> <span> <!-- <a href="tel:+91 9842304319" style="color:#2c2c2c;">For Machine Enquiry: +91 98423 04319</a> <br> --> <a href="tel:+91 7397685550" style="color:#2c2c2c;">For Machine Enquiry: +91 73976 85550</a> <br> <a href="tel:+91 42225 90810" style="color:#2c2c2c;">For Careers & General Enquiry: +91 42225 90810</a> </span> </div> <div class="contactdiv"> <span class="contactdiv1">Email :</span> <span> <a href="mailto:enquiry.lead.trading@stengineers.com" style="color:#2c2c2c;">enquiry.lead.trading@stengineers.com</a> </span> </div> <div class="contactdiv"> <span class="contactdiv1">Address :</span> <span class="contactdiv2"> <span> S&T Engineers (P) Ltd</span><br/> <span>22, Vasanth Nagar, </span><br/> <span>Singanallur, Coimbatore - 641005,</span><br/> <span>Tamil Nadu, INDIA.</span><br/> </span> </div> <span class="svgsSpan"> <a href="https://www.facebook.com/stengineersindia" target="blank"> <svg xmlns="http://www.w3.org/2000/svg" width="44.286" height="44.289" viewBox="0 0 44.286 44.289"> <g id="Group_4850" data-name="Group 4850" transform="translate(-407.926 -1071.342)"> <path id="Path_751" data-name="Path 751" d="M302.031,33.1a21.643,21.643,0,1,0-25.026,21.381V39.358h-5.495V33.1h5.495V28.332c0-5.425,3.231-8.421,8.176-8.421a33.229,33.229,0,0,1,4.845.423V25.66H287.3c-2.688,0-3.527,1.668-3.527,3.38V33.1h6l-.961,6.257h-5.043V54.482A21.65,21.65,0,0,0,302.031,33.1Z" transform="translate(149.681 1060.385)" fill="none" stroke="#6a6a6a" stroke-width="1"/> <path id="Path_752" data-name="Path 752" d="M284.671,36.615l.961-6.257h-6V26.3c0-1.711.839-3.38,3.527-3.38h2.73V17.591a33.228,33.228,0,0,0-4.845-.423c-4.944,0-8.176,3-8.176,8.421v4.768h-5.495v6.257h5.495V51.739a21.832,21.832,0,0,0,6.763,0V36.615Z" transform="translate(153.822 1063.129)" fill="#656565" stroke="#fff" stroke-width="1"/> </g> </svg> </a> <a href="https://www.instagram.com/stengineers/ " target="blank"> <svg xmlns="http://www.w3.org/2000/svg" width="44.287" height="44.288" viewBox="0 0 44.287 44.288"> <g id="Group_4851" data-name="Group 4851" transform="translate(-470.791 -1071.371)"> <path id="Path_435" data-name="Path 435" d="M21.644,0A21.644,21.644,0,1,1,0,21.644,21.644,21.644,0,0,1,21.644,0Z" transform="translate(471.291 1071.871)" fill="none" stroke="#6a6a6a" stroke-width="1" opacity="0.75"/> <g id="Group_43" data-name="Group 43" transform="translate(481.383 1081.936)"> <g id="Group_1065" data-name="Group 1065" transform="translate(0 0)"> <path id="Path_748" data-name="Path 748" d="M320.723,20.567a1.354,1.354,0,1,0,1.354,1.354A1.354,1.354,0,0,0,320.723,20.567Z" transform="translate(-303.055 -16.442)" fill="#6a6a6a"/> <path id="Path_749" data-name="Path 749" d="M317.373,21.856a5.689,5.689,0,1,0,5.689,5.688A5.695,5.695,0,0,0,317.373,21.856Zm0,9.333a3.645,3.645,0,1,1,3.644-3.645A3.649,3.649,0,0,1,317.373,31.189Z" transform="translate(-305.727 -15.994)" fill="#6a6a6a"/> <path id="Path_750" data-name="Path 750" d="M323.426,40.607H314.2a6.947,6.947,0,0,1-6.94-6.939V24.445a6.947,6.947,0,0,1,6.94-6.939h9.223a6.947,6.947,0,0,1,6.94,6.939v9.224A6.947,6.947,0,0,1,323.426,40.607ZM314.2,19.68a4.771,4.771,0,0,0-4.766,4.765v9.224a4.771,4.771,0,0,0,4.766,4.765h9.223a4.77,4.77,0,0,0,4.766-4.765V24.445a4.77,4.77,0,0,0-4.766-4.765Z" transform="translate(-307.263 -17.506)" fill="#6a6a6a"/> </g> </g> </g> </svg> </a> <a href="https://twitter.com/STEngineersPvt1" target="blank"> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="44.287" height="44.288" viewBox="0 0 44.287 44.288"> <defs> <clipPath id="clip-path"> <rect width="44.287" height="44.288" fill="none"/> </clipPath> </defs> <g id="Repeat_Grid_6" data-name="Repeat Grid 6" clip-path="url(#clip-path)"> <g id="Group_4858" data-name="Group 4858" transform="translate(-656.5 -1105.5)"> <g id="Group_45" data-name="Group 45" transform="translate(656.514 1106)" opacity="0.75"> <ellipse id="Ellipse_56" data-name="Ellipse 56" cx="21.644" cy="21.644" rx="21.644" ry="21.644" transform="translate(0.486 0)" fill="none" stroke="#6a6a6a" stroke-width="1"/> </g> <path id="twitter_1_" data-name="twitter (1)" d="M26.64,9.783,35.056,0H33.062L25.754,8.495,19.917,0H13.185l8.826,12.845L13.185,23.1h1.994L22.9,14.134,29.061,23.1h6.732L26.639,9.783Zm-2.732,3.175-.894-1.279L15.9,1.5h3.063L24.7,9.715l.894,1.279,7.464,10.677H30l-6.091-8.712Z" transform="translate(653.815 1116)" fill="#6a6a6a"/> </g> </g> </svg> </a> <a href=" https://www.linkedin.com/company/s-&-t-engineers-p-ltd/ " target="blank"> <svg xmlns="http://www.w3.org/2000/svg" width="44.287" height="44.288" viewBox="0 0 44.287 44.288"> <g id="Group_4853" data-name="Group 4853" transform="translate(-596.548 -1071.371)"> <g id="Group_45" data-name="Group 45" transform="translate(596.563 1071.871)" opacity="0.75"> <ellipse id="Ellipse_56" data-name="Ellipse 56" cx="21.644" cy="21.644" rx="21.644" ry="21.644" transform="translate(0.486 0)" fill="none" stroke="#6a6a6a" stroke-width="1"/> </g> <g id="_x31_0.Linkedin" transform="translate(608.528 1081.936)"> <path id="Path_769" data-name="Path 769" d="M52.042,49.84V42.051c0-3.828-.824-6.751-5.289-6.751a4.615,4.615,0,0,0-4.173,2.286h-.053v-1.94H38.3V49.84h4.412V42.8c0-1.861.346-3.642,2.631-3.642,2.259,0,2.286,2.1,2.286,3.748v6.911h4.412Z" transform="translate(-30.778 -28.575)" fill="#6a6a6a"/> <path id="Path_770" data-name="Path 770" d="M11.3,36.6h4.412V50.794H11.3Z" transform="translate(-10.954 -29.53)" fill="#6a6a6a"/> <path id="Path_771" data-name="Path771" d="M12.552,10A2.565,2.565,0,1,0,15.1,12.552,2.552,2.552,0,0,0,12.552,10Z" transform="translate(-10 -10)" fill="#6a6a6a"/> </g> </g> </svg> </a> <a href=" https://www.youtube.com/channel/UC3j_GQfOp3XZvSl3DKCHlgw " target="blank"> <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="64px" height="64px" viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve" fill="#000000"> <g id="SVGRepo_bgCarrier" stroke-width="0"/> <g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"/> <g id="SVGRepo_iconCarrier"> <g> <path fill="#6a6a6a" d="M16-0.035C7.158-0.035-0.034,7.159-0.034,16S7.158,32.035,16,32.035S32.034,24.841,32.034,16 S24.842-0.035,16-0.035z M16,30.965C7.748,30.965,1.034,24.252,1.034,16S7.748,1.035,16,1.035S30.966,7.748,30.966,16 S24.252,30.965,16,30.965z"/> <path fill="#6a6a6a" d="M19.525,15.616c-0.533-0.278-1.105-0.594-1.678-0.909c-1.194-0.658-2.323-1.28-3.163-1.614 c-0.153-0.062-0.327-0.042-0.465,0.05C14.082,13.237,14,13.392,14,13.558v4.987c0,0.171,0.088,0.331,0.232,0.422 c0.082,0.052,0.175,0.078,0.268,0.078c0.073,0,0.146-0.016,0.215-0.048c1.006-0.478,2.11-1.065,3.179-1.633 c0.545-0.291,1.093-0.582,1.631-0.86c0.165-0.086,0.27-0.256,0.27-0.443S19.69,15.703,19.525,15.616z M17.424,16.48 c-0.809,0.43-1.638,0.871-2.424,1.264v-3.417c0.699,0.337,1.543,0.802,2.365,1.255c0.288,0.159,0.576,0.317,0.86,0.472 C17.959,16.196,17.69,16.338,17.424,16.48z"/> <path fill="#6a6a6a" d="M22.304,10.626c-0.812-0.293-5-0.316-6.264-0.316c-2.504,0-4.67,0.072-5.795,0.193 c-0.639,0.067-1.198,0.365-1.617,0.859c-1.176,1.383-0.925,7.562-0.412,8.97c0.265,0.725,0.769,1.214,1.498,1.454 c0.984,0.324,5.328,0.34,6.189,0.34c1.759,0,5.934-0.045,6.717-0.456c0.486-0.253,0.842-0.614,1.058-1.075 c0.728-1.561,0.68-7.022,0.087-8.56C23.503,11.355,23.011,10.881,22.304,10.626z M22.771,20.172 c-0.121,0.26-0.322,0.459-0.612,0.61c-0.353,0.167-2.664,0.344-6.256,0.344c-3.279,0-5.438-0.146-5.877-0.291 c-0.436-0.143-0.713-0.412-0.871-0.846c-0.502-1.378-0.551-7.057,0.235-7.98c0.253-0.299,0.576-0.472,0.961-0.512 c1.075-0.116,3.255-0.188,5.688-0.188c3.386,0,5.579,0.132,5.924,0.257c0.435,0.157,0.71,0.42,0.867,0.829 C23.331,13.692,23.378,18.872,22.771,20.172z"/> </g> </g> </svg> </a> </span> </div> <div class="col-lg-7"> <form method="POST" class="contact_form" id="enq_form" onsubmit="return submitContactForm(event);"> <div class="row"> <input class="form-control" type="hidden" name="pageSource" id="e_pageSource1" value="<?php echo $currentPage; ?>"> <div class="col-sm-6"> <div class="form-group"> <input class="form-control" name="name" id="e_name1" type="text" placeholder="Name*"> <span style="color: red;" class="errorform" id="e_name_Err1"></span> </div> </div> <div class="col-sm-6"> <div class="form-group"> <input class="form-control" name="company" id="e_company1" type="text" placeholder="Company*"> <span style="color: red;" class="errorform" id="e_company_Err1"></span> </div> </div> <div class="col-sm-6"> <div class="form-group"> <input class="form-control" name="email" id="e_email1" type="email" placeholder="Email ID*"> <span style="color: red;" class="errorform" id="e_email_Err1"></span> </div> </div> <div class="col-sm-6"> <div class="form-group"> <input class="form-control" name="mobile" id="e_mobile1" type="tel" inputmode="tel"> <span style="color: red;" class="errorform" id="e_mobile_Err1"></span> </div> </div> <div class="col-sm-6"> <div class="form-group"> <input class="form-control" name="country" id="e_country1" type="text" placeholder="Country*"> <span style="color: red;" class="errorform" id="e_country_Err1"></span> </div> </div> <div class="col-sm-6"> <div class="form-group"> <input class="form-control" name="pincode" id="e_pincode1" type="text" placeholder="Pin Code*"> <span style="color: red;" class="errorform" id="e_pincode_Err1"></span> </div> </div> <div class="col-12"> <div class="form-group"> <input class="form-control" name="product" id="e_product1" type="text" placeholder="Product"> <span style="color: red;" class="errorform" id="e_product_Err1"></span> </div> </div> <div class="col-12"> <div class="form-group mt-25"> <textarea class="form-control w-100" name="message" id="e_message1" cols="30" rows="4" placeholder="Message"></textarea> <span style="color: red;" class="errorform" id="e_message_Err1"></span> </div> </div> <!-- ✅ ADDED: reCAPTCHA widget (right before Submit) --> <div class="form-group mt-3"> <div class="g-recaptcha" data-sitekey="6LdpyB4sAAAAAFEGvTl7alj-dlsTn0qtlYbRGVw9" data-callback="onCaptchaVerified" data-expired-callback="onCaptchaExpired"></div> <span style="color: red;" id="recaptcha-error" class="errorform"></span> </div> <div class="form-group mt-3"> <button type="submit" class="boxed-btn" id="add-submit">SUBMIT</button> <div id="succ-client-alert1" style="color: green;padding: 6px 0px 0px 16px;text-align:center"></div> <div id="fail-client-alert1" style="color: red;padding: 6px 0px 0px 16px; text-align:center"></div> </div> </form> </div> </div> </div> </section> <!-- End Form/Address --> <section class="google-map-one"> <iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3916.5260548316382!2d77.0240308757377!3d10.999101755045576!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x3ba8576c15087873%3A0xe64cfece3c932345!2sS%26T%20Engineers(P)Ltd%20%7CBest%20Metal%20Milling%2C%20Laser%20Cutting%2CForming%2C%20Top%20CNC%20Wire%20EDM%2C%20Machine%20Tool%20Accessory%20suppliers%20Coimbatore!5e0!3m2!1sen!2sin!4v1703496046306!5m2!1sen!2sin" width="100%" height="580px" style="border:0;" allowfullscreen="" loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe> </section> <?php require 'footer.php';?> <script src="https://rawgit.com/RobinHerbots/jquery.inputmask/3.x/dist/jquery.inputmask.bundle.js"></script> <scriptsrc="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script src="https://rawgit.com/RobinHerbots/jquery.inputmask/3.x/dist/jquery.inputmask.bundle.js"></script> <script> // Global variable to store intlTelInput instance let phoneInputInstance = null; let isCaptchaVerified = false; function onCaptchaVerified(token) { isCaptchaVerified = true; document.getElementById('recaptcha-error').textContent = ''; } function onCaptchaExpired() { isCaptchaVerified = false; if (typeof grecaptcha !== 'undefined') grecaptcha.reset(); } // Initialize phone input with intlTelInput $(document).ready(function($) { var phoneInputID = "#e_mobile1"; var input = document.querySelector(phoneInputID); phoneInputInstance = window.intlTelInput(input, { formatOnDisplay: true, autoHideDialCode: false, autoPlaceholder: "aggressive", hiddenInput: "full_number", initialCountry: "auto", preferredCountries: ['in', 'us', 'gb', 'ca', 'au', 'de', 'fr'], separateDialCode: true, customPlaceholder: function(selectedCountryPlaceholder, selectedCountryData) { return '' + selectedCountryPlaceholder.replace(/[0-9]/g, 'X'); }, geoIpLookup: function(callback) { $.get('https://ipinfo.io', function() {}, "jsonp").always(function(resp) { var countryCode = (resp && resp.country) ? resp.country : ""; callback(countryCode); }); }, utilsScript: "https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/11.0.14/js/utils.js" }); $(phoneInputID).on("focus click countrychange", function(e, countryData) { var pl = $(this).attr('placeholder') + ''; var res = pl.replace(/X/g, '9'); if (res != 'undefined') { $(this).inputmask(res, {placeholder: "X", clearMaskOnLostFocus: true}); } }); }); // Main form submission function function submitContactForm(event) { event.preventDefault(); // Prevent normal form submission // Clear previous messages document.querySelectorAll('.errorform').forEach(el => el.textContent = ''); document.getElementById('recaptcha-error').textContent = ''; document.getElementById('succ-client-alert1').textContent = ''; document.getElementById('fail-client-alert1').textContent = ''; let isValid = true; // 1. Check reCAPTCHA if (!isCaptchaVerified) { document.getElementById('recaptcha-error').textContent = 'Please verify that you are not a robot.'; isValid = false; } // 2. Validate Name const nameEl = document.getElementById('e_name1'); if (!nameEl.value.trim()) { document.getElementById('e_name_Err1').textContent = 'Name is required'; isValid = false; } else if (nameEl.value.trim().length < 2) { document.getElementById('e_name_Err1').textContent = 'Name must be at least 2 characters'; isValid = false; } // 3. Validate Company const companyEl = document.getElementById('e_company1'); if (!companyEl.value.trim()) { document.getElementById('e_company_Err1').textContent = 'Company is required'; isValid = false; } // 4. Validate Email const emailEl = document.getElementById('e_email1'); const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; if (!emailEl.value.trim()) { document.getElementById('e_email_Err1').textContent = 'Email is required'; isValid = false; } else if (!emailRegex.test(emailEl.value.trim())) { document.getElementById('e_email_Err1').textContent = 'Please enter a valid email address'; isValid = false; } // 5. Validate Mobile const mobileEl = document.getElementById('e_mobile1'); const mobileValue = mobileEl.value.trim(); if (!mobileValue) { document.getElementById('e_mobile_Err1').textContent = 'Mobile number is required'; isValid = false; } else if (phoneInputInstance && !phoneInputInstance.isValidNumber()) { const countryData = phoneInputInstance.getSelectedCountryData(); document.getElementById('e_mobile_Err1').textContent = `Please enter a valid ${countryData.name} mobile number`; isValid = false; } // 6. Validate Country const countryEl = document.getElementById('e_country1'); if (!countryEl.value.trim()) { document.getElementById('e_country_Err1').textContent = 'Country is required'; isValid = false; } // 7. Validate Pincode const pincodeEl = document.getElementById('e_pincode1'); const pincodeValue = pincodeEl.value.trim(); if (!pincodeValue) { document.getElementById('e_pincode_Err1').textContent = 'Pin Code/Zip Code is required'; isValid = false; } else if (pincodeValue.length < 3) { document.getElementById('e_pincode_Err1').textContent = 'Pin Code must be at least 3 characters'; isValid = false; } // If validation fails, scroll to first error if (!isValid) { const firstError = document.querySelector('.errorform:not(:empty)'); if (firstError) { firstError.scrollIntoView({ behavior: 'smooth', block: 'center' }); } return false; } // If validation passes, submit via AJAX submitFormViaAjax(); return false; } // AJAX form submission function submitFormViaAjax() { const btn = document.getElementById('add-submit'); const originalBtnText = btn.textContent; btn.disabled = true; btn.textContent = 'Submitting...'; // Get form data const formData = new FormData(); // Add all form fields formData.append('name', document.getElementById('e_name1').value.trim()); formData.append('company', document.getElementById('e_company1').value.trim()); formData.append('email', document.getElementById('e_email1').value.trim()); formData.append('country', document.getElementById('e_country1').value.trim()); formData.append('pincode', document.getElementById('e_pincode1').value.trim()); formData.append('product', document.getElementById('e_product1').value.trim()); formData.append('message', document.getElementById('e_message1').value.trim()); formData.append('pageSource', document.getElementById('e_pageSource1').value); // Add phone number with country code if (phoneInputInstance) { const fullNumber = phoneInputInstance.getNumber(); formData.append('mobile', fullNumber); } else { formData.append('mobile', document.getElementById('e_mobile1').value.trim()); } // Add reCAPTCHA response const recaptchaResponse = grecaptcha.getResponse(); if (recaptchaResponse) { formData.append('g-recaptcha-response', recaptchaResponse); } // Send AJAX request to your API endpoint fetch('https://stengineers.com/admin/api/insertcontact.php', { method: 'POST', body: formData }) .then(response => { // First check if response is JSON const contentType = response.headers.get('content-type'); if (contentType && contentType.includes('application/json')) { return response.json(); } else { return response.text().then(text => { // Try to parse as JSON even if content-type is wrong try { return JSON.parse(text); } catch { // If not JSON, return a generic response return { success: response.ok, message: text || 'Form submitted successfully' }; } }); } }) .then(data => { console.log('API Response:', data); // Debug log // Handle response based on your API's response format if (data.success || data.status === 'success' || data.message?.includes('success')) { // Show success message briefly, then redirect const successMessage = 'Thank you! Your message has been sent successfully.'; document.getElementById('succ-client-alert1').innerHTML = ` <div style="background: #d4edda; color: #155724; padding: 12px; border-radius: 5px; border: 1px solid #c3e6cb;"> <strong>Success!</strong> ${successMessage}<br> <small>Redirecting to thank you page...</small> </div> `; document.getElementById('fail-client-alert1').textContent = ''; // Reset form document.getElementById('enq_form').reset(); // Reset phone input if (phoneInputInstance) { phoneInputInstance.setNumber(""); } // Reset captcha if (typeof grecaptcha !== 'undefined') { grecaptcha.reset(); } isCaptchaVerified = false; // Redirect to thank you page after 1.5 seconds setTimeout(() => { window.location.href = "https://stengineers.com/thank-you/"; }, 1500); } else { // Show error message const errorMessage = data.message || 'There was an error submitting your form. Please try again.'; document.getElementById('fail-client-alert1').innerHTML = ` <div style="background: #f8d7da; color: #721c24; padding: 12px; border-radius: 5px; border: 1px solid #f5c6cb;"> <strong>Error!</strong> ${errorMessage} </div> `; document.getElementById('succ-client-alert1').textContent = ''; } }) .catch(error => { console.error('Error:', error); document.getElementById('fail-client-alert1').innerHTML = ` <div style="background: #f8d7da; color: #721c24; padding: 12px; border-radius: 5px; border: 1px solid #f5c6cb;"> <strong>Error!</strong> There was an error submitting your form. Please try again. </div> `; document.getElementById('succ-client-alert1').textContent = ''; }) .finally(() => { // Re-enable button btn.disabled = false; btn.textContent = originalBtnText; }); } // Add real-time validation for better UX document.addEventListener('DOMContentLoaded', function() { const inputs = document.querySelectorAll('#enq_form input, #enq_form textarea'); inputs.forEach(input => { input.addEventListener('blur', function() { validateField(this); }); input.addEventListener('input', function() { const fieldName = this.name; const errorId = `e_${fieldName}_Err1`; const errorElement = document.getElementById(errorId); if (errorElement) { errorElement.textContent = ''; } }); }); }); // Validate individual field function validateField(field) { const fieldName = field.name; const fieldValue = field.value.trim(); const errorId = `e_${fieldName}_Err1`; const errorElement = document.getElementById(errorId); if (!errorElement) return; errorElement.textContent = ''; switch(fieldName) { case 'name': if (!fieldValue) { errorElement.textContent = 'Name is required'; } else if (fieldValue.length < 2) { errorElement.textContent = 'Name must be at least 2 characters'; } break; case 'company': if (!fieldValue) { errorElement.textContent = 'Company is required'; } break; case 'email': const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; if (!fieldValue) { errorElement.textContent = 'Email is required'; } else if (!emailRegex.test(fieldValue)) { errorElement.textContent = 'Please enter a valid email address'; } break; case 'mobile': if (!fieldValue) { errorElement.textContent = 'Mobile number is required'; } else if (phoneInputInstance && !phoneInputInstance.isValidNumber()) { const countryData = phoneInputInstance.getSelectedCountryData(); errorElement.textContent = `Please enter a valid ${countryData.name} mobile number`; } break; case 'country': if (!fieldValue) { errorElement.textContent = 'Country is required'; } break; case 'pincode': if (!fieldValue) { errorElement.textContent = 'Pin Code/Zip Code is required'; } else if (fieldValue.length < 3) { errorElement.textContent = 'Pin Code must be at least 3 characters'; } break; case 'product': if (fieldValue && fieldValue.length < 2) { errorElement.textContent = 'Product must be at least 2 characters'; } break; case 'message': if (fieldValue && fieldValue.length < 10) { errorElement.textContent = 'Message must be at least 10 characters'; } break; } } </script> <!-- ✅ ADDED: reCAPTCHA API --> <script src="https://www.google.com/recaptcha/api.js" async defer></script>