<!-- π‘ Thank You Message w/ Backend Submission Integration -->
<div class="dmform-success" style="text-align:center; display:block; padding:20px;">
<h4 style="color:#f6c700; font-family:'Abril Fatface', serif; font-size:1.2rem;">
Let’s Get You Paid Like Royalty π…
</h4>
<h2 style="color:#f6c700; font-family:'Abril Fatface', serif; text-shadow:0 0 8px rgba(246,199,0,0.6); font-size:2rem;">
Get A Fair & Favorable Cash Offer!
</h2>
<h3 style="color:#fff; font-family:'Abril Fatface', serif; font-size:1.5rem;">
π You're All Set!
</h3>
<p style="font-family:'Montserrat', sans-serif; color:#fff; font-size:1.1rem;">
Thank you for submitting your property details to <strong>MNM Estates Co.</strong> Our team is reviewing your submission and will contact you within <strong>24 business hours</strong>.
</p>
<p style="font-family:'Montserrat', sans-serif; color:#999; font-size:0.95rem;">
If you need to reach us sooner, email <a href="mailto:deals@mnmestates.co" style="color:#f6c700;">deals@mnmestates.co</a> or call/text <span style="color:#f6c700;">913-945-0182</span>.
</p>
</div>
<script>
document.addEventListener("DOMContentLoaded", () => {
const form = document.querySelector("form.dmRespDesignRow");
if (!form) return;
form.addEventListener("submit", async (e) => {
e.preventDefault(); // Stop native form submission
const formData = {
name: form.querySelector('input[name="dmform-0"]').value,
email: form.querySelector('input[name="dmform-1"]').value,
phone: form.querySelector('input[name="dmform-2"]').value,
message: form.querySelector('textarea[name="dmform-3"]').value
};
try {
const res = await fetch("https://mnm-api-backend.onrender.com/api/lead", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(formData)
});
if (!res.ok) throw new Error("Failed to submit form.");
document.querySelector(".dmform-wrapper").style.display = "none";
document.querySelector(".dmform-success").style.display = "block";
} catch (err) {
console.error(err);
document.querySelector(".dmform-wrapper").style.display = "none";
document.querySelector(".dmform-error").style.display = "block";
}
});
});
</script>