 {"id":43,"date":"2026-03-16T10:17:56","date_gmt":"2026-03-16T10:17:56","guid":{"rendered":"https:\/\/wp-poc.ahk-prod.com\/?page_id=43"},"modified":"2026-04-27T11:06:27","modified_gmt":"2026-04-27T11:06:27","slug":"debt-collection-form","status":"publish","type":"page","link":"https:\/\/wp-poc.ahk-prod.com\/index.php\/debt-collection-form\/","title":{"rendered":"Debt Collection Form"},"content":{"rendered":"\n<style>\n:root {\n    --primary-color: #2563eb;\n    --primary-hover: #1d4ed8;\n    --bg-color: #f1f5f9;\n    --text-main: #1e293b;\n}\n\nbody {\n    background: var(--bg-color);\n    margin: 0;\n    height: 100vh;\n    display: flex;\n    justify-content: center;\n    align-items: center;\n    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n}\n\n.debt-card {\n    width: 100%;\n    max-width: 420px;\n    padding: 30px;\n    background: #ffffff;\n    border-radius: 14px;\n    box-shadow: 0 10px 30px rgba(0,0,0,0.08);\n}\n\n.debt-card h2 {\n    text-align: center;\n    margin-bottom: 20px;\n    color: var(--text-main);\n}\n\n.form-group {\n    margin-bottom: 16px;\n}\n\n.form-group label {\n    display: block;\n    margin-bottom: 6px;\n    font-size: 14px;\n    color: var(--text-main);\n    font-weight: 500;\n}\n\n.debt-card input {\n    width: 100%;\n    padding: 12px 14px;\n    border: 1.5px solid #e2e8f0;\n    border-radius: 8px;\n    font-size: 14px;\n    transition: 0.3s;\n}\n\n.debt-card input:focus {\n    outline: none;\n    border-color: var(--primary-color);\n    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);\n}\n\n.debt-card button {\n    width: 100%;\n    padding: 13px;\n    background: var(--primary-color);\n    color: #fff;\n    border: none;\n    border-radius: 8px;\n    font-weight: 600;\n    cursor: pointer;\n    transition: 0.3s;\n}\n\n.debt-card button:hover {\n    background: var(--primary-hover);\n}\n\n.debt-card button:disabled {\n    background: #94a3b8;\n    cursor: not-allowed;\n}\n<\/style>\n\n<div class=\"debt-card\">\n<h2>Debit Collection Follow-up<\/h2>\n    <form id=\"debtForm\">\n        <div class=\"form-group\">\n            <label>Name :<\/label>\n            <input type=\"text\" name=\"debtorName\" required>\n        <\/div>\n\n        <div class=\"form-group\">\n            <label>Case Number :<\/label>\n            <input type=\"text\" name=\"caseNumber\" required>\n        <\/div>\n\n        <div class=\"form-group\">\n            <label>Amount Due (\u20b9) :<\/label>\n            <input type=\"number\" name=\"amountDue\" required>\n        <\/div>\n\n        <div class=\"form-group\">\n            <label>Phone Number :<\/label>\n            <input type=\"tel\" name=\"phone\" required>\n        <\/div>\n\n        <div class=\"form-group\">\n            <label>Email Address :<\/label>\n            <input type=\"email\" name=\"email\" required>\n        <\/div>\n\n        <button type=\"submit\" id=\"submitBtn\">Submit<\/button>\n    <\/form>\n<\/div>\n\n<script>\ndocument.getElementById(\"debtForm\").addEventListener(\"submit\", async function(e) {\n    e.preventDefault();\n\n    const btn = document.getElementById(\"submitBtn\");\n    const originalText = btn.innerText;\n\n    btn.disabled = true;\n    btn.innerText = \"Processing...\";\n\n    const formData = new FormData(this);\n    const data = Object.fromEntries(formData.entries());\n\n    try {\n        const response = await fetch(\"https:\/\/n8n-debt.bicsglobal.com\/webhook\/debt-alert\", {\n            method: \"POST\",\n            headers: { \"Content-Type\": \"application\/json\" },\n            body: JSON.stringify(data)\n        });\n\n        if (response.ok) {\n            alert(\"\u2705 Lead sent successfully!\");\n            this.reset();\n        } else {\n            alert(\"\u26a0\ufe0f Server error\");\n        }\n    } catch (err) {\n        alert(\"\u274c Connection failed\");\n        console.error(err);\n    }\n\n    btn.disabled = false;\n    btn.innerText = originalText;\n});\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>Debit Collection Follow-up Name : Case Number : Amount Due (\u20b9) : Phone Number : Email Address : Submit<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-43","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/wp-poc.ahk-prod.com\/index.php\/wp-json\/wp\/v2\/pages\/43","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp-poc.ahk-prod.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/wp-poc.ahk-prod.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/wp-poc.ahk-prod.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp-poc.ahk-prod.com\/index.php\/wp-json\/wp\/v2\/comments?post=43"}],"version-history":[{"count":19,"href":"https:\/\/wp-poc.ahk-prod.com\/index.php\/wp-json\/wp\/v2\/pages\/43\/revisions"}],"predecessor-version":[{"id":93,"href":"https:\/\/wp-poc.ahk-prod.com\/index.php\/wp-json\/wp\/v2\/pages\/43\/revisions\/93"}],"wp:attachment":[{"href":"https:\/\/wp-poc.ahk-prod.com\/index.php\/wp-json\/wp\/v2\/media?parent=43"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}