{"id":210,"date":"2024-10-07T05:15:31","date_gmt":"2024-10-07T05:15:31","guid":{"rendered":"https:\/\/www.nrfsi.com\/?page_id=210"},"modified":"2026-04-22T05:59:40","modified_gmt":"2026-04-22T05:59:40","slug":"mandate","status":"publish","type":"page","link":"https:\/\/www.nrfsi.com\/index.php\/mandate\/","title":{"rendered":"Mandate"},"content":{"rendered":"<div class=\"page-heading \">\n<div class=\"container\">\n<div class=\"row\">\n<div class=\"col-lg-12\">\n<div class=\"header-text\">\n<h2>Mandate Cancellation<\/h2>\n<div class=\"div-dec\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n\n<div class=\"mandateForm\">\n<div class=\"container mt-5\">\n  <div class=\"row justify-content-center\">\n    <div class=\"col-md-4\">\n      <div class=\"card\">\n        <div class=\"card-header\">\n          <h4 class=\"mb-0\">Mandate Cancellation Form<\/h4>\n        <\/div>\n        <div class=\"card-body\">\n          <form id=\"mandateForm\">\n            <div class=\"form-group mb-3\">\n              <label for=\"loan_number\">Enter the LAN Number :<\/label>\n              <input type=\"text\" class=\"form-control\" id=\"loan_number\" name=\"loan_number\" required>\n            <\/div>\n\n           \n\n            <div class=\"form-group  mb-4\">\n              <label for=\"customer_email\">Enter the contact Email ID :<\/label>\n              <input type=\"email\" class=\"form-control\" id=\"customer_email\" name=\"customer_email\" required>\n            <\/div>\n <div class=\"form-group  mb-3\">\n              <label for=\"mobile_number\">Enter the contact mobile number :<\/label>\n              <input type=\"text\" class=\"form-control\" id=\"mobile_number\" name=\"mobile_number\" pattern=\"^\\d{10}$\" title=\"Please enter a valid 10-digit mobile number\" required>\n            <\/div>\n\n            <button type=\"submit\" class=\"btn btn-secondary btn-block\">Submit<\/button>\n          <\/form>\n\n          <div id=\"success-message\" style=\"display: none;\" class=\"alert alert-success mt-3\">\n            Email Sent Successfully!\n          <\/div>\n        <\/div>\n      <\/div>\n    <\/div>\n  <\/div>\n<\/div>\n\n<script>\nfunction validateForm() {\n    const loanNumber = document.getElementById('loan_number').value.trim();\n    const mobileNumber = document.getElementById('mobile_number').value.trim();\n    const email = document.getElementById('customer_email').value.trim();\n\n    if (!loanNumber || !mobileNumber || !email) {\n        alert('All fields are required.');\n        return false;\n    }\n\n    const mobilePattern = \/^\\d{10}$\/;\n    if (!mobilePattern.test(mobileNumber)) {\n        alert('Please enter a valid 10-digit mobile number.');\n        return false;\n    }\n\n    return true;\n}\n\ndocument.getElementById('mandateForm').addEventListener('submit', async function(e) {\n    e.preventDefault();\n\n    if (!validateForm()) return;\n\n    const loanNumber = document.getElementById('loan_number').value.trim();\n    const email = document.getElementById('customer_email').value.trim();\n    const mobile = document.getElementById('mobile_number').value.trim();\n\n    try {\n        const response = await fetch('https:\/\/digi-sas.nrfsi.com\/api\/send\/mail', {\n            method: 'POST',\n            headers: {\n                'Content-Type': 'application\/json',\n                'Accept': 'application\/json'\n            },\n            body: JSON.stringify({\n                loan_number: loanNumber,\n                email: email,\n                mobile: mobile,\n                to_email: ['umasankar.selvaraj@nrfsi.com', 'vignesh.ravi-extern@nrfsi.com']\n            })\n        });\n\n        const data = await response.json();\n\n        if (response.ok && data.status === 'success') {\n            alert('Mail sent successfully');\n            document.getElementById('mandateForm').reset();\n        } else {\n            alert(data.message || 'Mail sending failed');\n        }\n\n    } catch (error) {\n        alert('Server not reachable');\n        console.error(error);\n    }\n});\n<\/script>","protected":false},"excerpt":{"rendered":"Mandate Cancellation Mandate Cancellation Form Enter the LAN Number : Enter the contact Email ID : Enter the contact mobile number : Submit Email Sent Successfully!","protected":false},"author":3,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-210","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.nrfsi.com\/index.php\/wp-json\/wp\/v2\/pages\/210","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nrfsi.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.nrfsi.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.nrfsi.com\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nrfsi.com\/index.php\/wp-json\/wp\/v2\/comments?post=210"}],"version-history":[{"count":18,"href":"https:\/\/www.nrfsi.com\/index.php\/wp-json\/wp\/v2\/pages\/210\/revisions"}],"predecessor-version":[{"id":503,"href":"https:\/\/www.nrfsi.com\/index.php\/wp-json\/wp\/v2\/pages\/210\/revisions\/503"}],"wp:attachment":[{"href":"https:\/\/www.nrfsi.com\/index.php\/wp-json\/wp\/v2\/media?parent=210"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}