const LeadCapture = () => { const [sent, setSent] = React.useState(false); const [sending, setSending] = React.useState(false); const [error, setError] = React.useState(""); const submit = async (e) => { e.preventDefault(); setSending(true); setError(""); const form = e.currentTarget; const formData = new FormData(form); try { const response = await fetch("send-mail.php", { method: "POST", body: formData, }); const result = await response.json(); if (result.success) { setSent(true); form.reset(); } else { setError(result.message || "Something went wrong. Please try again."); } } catch (err) { setError("Something went wrong. Please try again."); } finally { setSending(false); } }; return (
For practice owners

Tell us who you’re hiring.

Four ways to start a conversation with Natalie and the Stonecrest Recruiting team. We respond within one business day — with a shortlist that fits your market, not a stack of résumés.

Book a 20-min call Tue & Thu · same-week openings Text us first (651) 332-1306 Call directly Mon–Fri · 9 AM – 5 PM CT Send Natalie a note natalie@stonecrestrecruiting.com
Scan to book
Or scan to text us. Opens a pre-filled message to Natalie. (651) 332-1306
{!sent ? ( <> Lead inquiry · 4 fields

A quick intro.

{error && (

{error}

)} Natalie or a placement strategist will reach out within one business day. ) : (

We received your inquiry.

Natalie or a placement strategist will reach out within one business day. You’ll get a confirmation at the email you provided.

)}
); }; Object.assign(window, { LeadCapture });