{"id":83,"date":"2025-10-21T12:45:57","date_gmt":"2025-10-21T12:45:57","guid":{"rendered":"https:\/\/wp.cleaningbd.com\/?page_id=83"},"modified":"2025-12-08T06:30:31","modified_gmt":"2025-12-08T06:30:31","slug":"contact","status":"publish","type":"page","link":"https:\/\/wp.cleaningbd.com\/?page_id=83","title":{"rendered":"Contact"},"content":{"rendered":"\n<?php\n\/**\n * Template Name: Contact Page (Fixed)\n *\/\n\nget_header();\n?>\n\n<!-- FIXED: WordPress AJAX Form Handler -->\n<script>\nconst ajaxUrl = \"<?php echo admin_url('admin-ajax.php'); ?>\";\n<\/script>\n\n<style>\n\/* (your same CSS unchanged) *\/\n<\/style>\n<script src=\"https:\/\/cdn.tailwindcss.com\"><\/script>\n\n<main class=\"py-16 sm:py-24\">\n    <div class=\"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8\">\n        <div class=\"text-center mb-12\">\n            <h1 class=\"text-4xl font-extrabold text-gray-900 mb-4\">Get in Touch with CleaningBD<\/h1>\n            <p class=\"text-lg text-gray-600\">We&#8217;re ready to make your space shine. Fill out the form below to book a service or request a quote.<\/p>\n        <\/div>\n\n        <div class=\"bg-white p-6 sm:p-10 rounded-xl shadow-2xl border-t-4 border-primary-blue\">\n            <div id=\"statusMessage\" class=\"mb-6 hidden p-4 rounded-lg text-center font-medium\" role=\"alert\"><\/div>\n\n            <form id=\"contactForm\" class=\"space-y-6\">\n                <input type=\"hidden\" name=\"action\" value=\"send_contact_email\">\n\n                <div>\n                    <label class=\"block text-sm font-medium text-gray-700\">Full Name *<\/label>\n                    <input type=\"text\" id=\"name\" name=\"name\" required class=\"mt-1 block w-full px-4 py-2 border border-gray-300 rounded-md\">\n                <\/div>\n                <div>\n                    <label class=\"block text-sm font-medium text-gray-700\">Email *<\/label>\n                    <input type=\"email\" id=\"email\" name=\"email\" required class=\"mt-1 block w-full px-4 py-2 border border-gray-300 rounded-md\">\n                <\/div>\n                <div>\n                    <label class=\"block text-sm font-medium text-gray-700\">Phone *<\/label>\n                    <input type=\"text\" id=\"phone\" name=\"phone\" required class=\"mt-1 block w-full px-4 py-2 border border-gray-300 rounded-md\">\n                <\/div>\n                <div class=\"grid grid-cols-1 md:grid-cols-2 gap-6\">\n                    <div>\n                        <label class=\"block text-sm font-medium text-gray-700\">Preferred Date *<\/label>\n                        <input type=\"date\" id=\"date\" name=\"date\" required class=\"mt-1 block w-full px-4 py-2 border border-gray-300 rounded-md\">\n                    <\/div>\n                    <div>\n                        <label class=\"block text-sm font-medium text-gray-700\">Preferred Time *<\/label>\n                        <input type=\"time\" id=\"time\" name=\"time\" required class=\"mt-1 block w-full px-4 py-2 border border-gray-300 rounded-md\">\n                    <\/div>\n                <\/div>\n                <div>\n                    <label class=\"block text-sm font-medium text-gray-700\">Type of Service *<\/label>\n                    <select id=\"service\" name=\"service\" required class=\"mt-1 block w-full px-4 py-2 border border-gray-300 rounded-md\">\n                        <option value=\"\">&#8212; Select &#8212;<\/option>\n                        <option value=\"Residential Cleaning\">Residential Cleaning<\/option>\n                        <option value=\"Commercial Cleaning\">Commercial Cleaning<\/option>\n                        <option value=\"Office Cleaning\">Office Cleaning<\/option>\n                        <option value=\"Carpet &#038; Floor Cleaning\">Carpet &#038; Floor Cleaning<\/option>\n                        <option value=\"Car Washing\">Car Washing<\/option>\n                        <option value=\"Deep Cleaning Special\">Deep Cleaning Special<\/option>\n                        <option value=\"General Query\">General Query<\/option>\n                    <\/select>\n                <\/div>\n                <div>\n                    <label class=\"block text-sm font-medium text-gray-700\">Message *<\/label>\n                    <textarea id=\"message\" name=\"message\" required rows=\"4\" class=\"mt-1 block w-full px-4 py-2 border border-gray-300 rounded-md\"><\/textarea>\n                <\/div>\n                <button type=\"submit\" id=\"submitButton\" class=\"w-full py-3 px-4 bg-primary-blue text-white font-bold rounded-full\">Send Booking Request<\/button>\n            <\/form>\n        <\/div>\n    <\/div>\n<\/main>\n\n<script>\nconst form = document.getElementById('contactForm');\nconst statusBox = document.getElementById('statusMessage');\n\nfunction showStatus(msg, type) {\n    statusBox.textContent = msg;\n    statusBox.classList.remove('hidden');\n    statusBox.classList.toggle('bg-green-100', type === 'success');\n    statusBox.classList.toggle('text-green-700', type === 'success');\n    statusBox.classList.toggle('bg-red-100', type === 'error');\n    statusBox.classList.toggle('text-red-700', type === 'error');\n}\n\nform.addEventListener('submit', async (e) => {\n    e.preventDefault();\n    const submitBtn = document.getElementById('submitButton');\n    submitBtn.textContent = 'Sending...';\n    submitBtn.disabled = true;\n\n    const formData = new FormData(form);\n\n    try {\n        const res = await fetch(ajaxUrl, {\n            method: 'POST',\n            body: formData\n        });\n\n        const text = await res.text();\n\n        if (text === 'success') {\n            showStatus('Your booking request has been sent successfully!', 'success');\n            form.reset();\n        } else {\n            showStatus('Error sending your request. Please try again.', 'error');\n        }\n\n    } catch (err) {\n        showStatus('Network error. Try again later.', 'error');\n    }\n\n    submitBtn.textContent = 'Send Booking Request';\n    submitBtn.disabled = false;\n});\n<\/script>\n\n<?php get_footer(); ?>\n\n","protected":false},"excerpt":{"rendered":"<p>Get in Touch with CleaningBD We&#8217;re ready to make your space shine. Fill out the form below to book a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"disabled","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"class_list":["post-83","page","type-page","status-publish","hentry"],"_hostinger_reach_plugin_has_subscription_block":false,"_hostinger_reach_plugin_is_elementor":false,"_links":{"self":[{"href":"https:\/\/wp.cleaningbd.com\/index.php?rest_route=\/wp\/v2\/pages\/83","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.cleaningbd.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/wp.cleaningbd.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/wp.cleaningbd.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.cleaningbd.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=83"}],"version-history":[{"count":10,"href":"https:\/\/wp.cleaningbd.com\/index.php?rest_route=\/wp\/v2\/pages\/83\/revisions"}],"predecessor-version":[{"id":273,"href":"https:\/\/wp.cleaningbd.com\/index.php?rest_route=\/wp\/v2\/pages\/83\/revisions\/273"}],"wp:attachment":[{"href":"https:\/\/wp.cleaningbd.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=83"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}