AEPS Flag Registration Form SBI (Annexure-I) AEPS Flag Registration Form SBI (Annexure-I)
Important Instructions: Please ensure that you correctly enter your Account Number, Customer Name, and Branch Name in the respective fields.
After generating the form, download the PDF , fill in the relevant boxes, and affix your signature at the designated places.
Attach self-attested copies of your valid Aadhaar Card and/or PAN Card along with the duly filled form.
Submit the completed form and documents at your respective home branch for further processing.
If any account holder prefers not to fill the form online, they may download the blank PDF , take a printout , fill in all details manually in their own handwriting , and submit it to the branch along with the supporting documents .
👉 Click here to download the AEPS Customer Request Form (Annexure-I)
This page requires JavaScript to show dynamic fields and generate the PDF. Please enable JavaScript or download the blank PDF from the link above.
`;
}// dynamic script loader
function loadScript(url) {
return new Promise((resolve, reject) => {
const s = document.createElement('script');
s.src = url;
s.async = true;
s.onload = () => resolve();
s.onerror = () => reject(new Error('Failed to load ' + url));
document.head.appendChild(s);
});
}async function ensureCanvasAndJsPDF() {
if (!window.html2canvas) {
await loadScript('https://cdn.jsdelivr.net/npm/html2canvas@1.4.1/dist/html2canvas.min.js');
}
if (!window.jspdf || !window.jspdf.jsPDF) {
await loadScript('https://cdn.jsdelivr.net/npm/jspdf@2.5.1/dist/jspdf.umd.min.js');
}
}// sanitize filename: allow letters, numbers, underscores, hyphens
function makeFilenameSafe(s) { return (s || '').toString().replace(/[^a-z0-9_\- ]/gi, '').trim().replace(/\s+/g, '_') || 'AEPS'; }// validation for numeric limits
function validateLimits() {
const primary = primarySelect.value;
if (!primary) return { ok:false, msg:'Please select Request Type.' };
if (primary === 'deregister') return { ok:true };const isNew = primary === 'new';
const subtype = isNew ? newSubtype.value : modSubtype.value;
if (!subtype) return { ok:false, msg:'Please select subtype (ONUS / Both).' };if (subtype === 'onus') {
const id = isNew ? 'newOnusLimit' : 'modOnusLimit';
const inp = document.getElementById(id);
const v = inp.value;
if (!v) return { ok:true }; // allowed to be blank — we only prefill if user entered
const num = Number(v);
if (isNaN(num) || num < 50 || num > 30000) return { ok:false, msg:'ONUS limit must be between ₹50 and ₹30,000.' };
} else if (subtype === 'both') {
const onusId = isNew ? 'newBothOnusLimit' : 'modBothOnusLimit';
const offusId = isNew ? 'newBothOffusLimit' : 'modBothOffusLimit';
const onusVal = document.getElementById(onusId).value;
const offusVal = document.getElementById(offusId).value;
// both allowed to be blank; but if provided must be valid
if (onusVal) {
const onusNum = Number(onusVal);
if (isNaN(onusNum) || onusNum < 50 || onusNum > 30000) return { ok:false, msg:'ONUS limit must be between ₹50 and ₹30,000.' };
}
if (offusVal) {
const offusNum = Number(offusVal);
if (isNaN(offusNum) || offusNum < 50 || offusNum > 10000) return { ok:false, msg:'OFFUS limit must be between ₹50 and ₹10,000.' };
}
}
return { ok:true };
}// PDF generation main
processBtn.addEventListener('click', async function () {
// basic form validity
if (!formEl.checkValidity()) {
formEl.reportValidity();
return;
}
const limitCheck = validateLimits();
if (!limitCheck.ok) { alert(limitCheck.msg); return; }setGenerating(true);
const acc = document.getElementById('accInput').value.trim();
const cust = document.getElementById('custInput').value.trim();
const branch = document.getElementById('branchInput').value.trim();
const humanDate = formatPrintableDate(new Date());
const isoDate = isoDateForFilename(new Date());
const printableHTML = buildPrintableHTML(acc, cust, branch, humanDate);// off-screen container for rendering
const tempContainer = document.createElement('div');
tempContainer.style.position = 'fixed';
tempContainer.style.left = '-9999px';
tempContainer.style.top = '0';
tempContainer.style.width = '210mm';
tempContainer.innerHTML = printableHTML;
document.body.appendChild(tempContainer);const pageEl = tempContainer.querySelector('.page') || tempContainer;
const filenameSafeCust = makeFilenameSafe(cust);
const filename = `AEPS_Request_${makeFilenameSafe(acc || 'account')}_${filenameSafeCust}_${isoDate}.pdf`;try {
await ensureCanvasAndJsPDF();const canvas = await window.html2canvas(pageEl, { scale: 2, useCORS: true, logging: false, allowTaint: false, windowWidth: pageEl.scrollWidth });
const imgData = canvas.toDataURL('image/jpeg', 0.98);const { jsPDF } = window.jspdf;
const pdf = new jsPDF('p', 'mm', 'a4');const pageWidthMM = 210;
const pageHeightMM = 297;
const marginMM = 10;
const usableWidth = pageWidthMM - marginMM * 2;
const usableHeight = pageHeightMM - marginMM * 2;const imgW = canvas.width;
const imgH = canvas.height;
const imgAspect = imgW / imgH;let imgWidthMM = usableWidth;
let imgHeightMM = imgWidthMM / imgAspect;if (imgHeightMM > usableHeight) {
imgHeightMM = usableHeight;
imgWidthMM = imgHeightMM * imgAspect;
}const x = marginMM + (usableWidth - imgWidthMM) / 2;
const y = marginMM + (usableHeight - imgHeightMM) / 2;pdf.addImage(imgData, 'JPEG', x, y, imgWidthMM, imgHeightMM, undefined, 'FAST');
const pdfBlob = pdf.output('blob');
const blobUrl = URL.createObjectURL(pdfBlob);// create a temporary anchor to download
const a = document.createElement('a');
a.href = blobUrl;
a.download = filename;
document.body.appendChild(a);
a.click();
a.remove();
setTimeout(() => URL.revokeObjectURL(blobUrl), 30000);} catch (err) {
console.error('PDF generation failed:', err);
alert('PDF generation failed. Please check console for details.');
} finally {
try { document.body.removeChild(tempContainer); } catch (e) { /* ignore */ }
setGenerating(false);
}
});// Reset handling
resetBtn.addEventListener('click', function () {
hideAllSubgroups();
primarySelect.value = '';
newSubtype.value = ''; modSubtype.value = '';
// clear number inputs
['newOnusLimit','newBothOnusLimit','newBothOffusLimit','modOnusLimit','modBothOnusLimit','modBothOffusLimit']
.forEach(id => { const el = document.getElementById(id); if (el) el.value = ''; });
setStatus('');
});// initial state
hideAllSubgroups();
})();