// Contact page function ContactPage({ onNavigate }) { const [form, setForm] = React.useState({ name: "", email: "", company: "", interest: "platform", message: "" }); const [submitted, setSubmitted] = React.useState(false); const [status, setStatus] = React.useState("idle"); // idle | sending | error const [error, setError] = React.useState(""); const hpRef = React.useRef(null); // honeypot const submit = async (e) => { e.preventDefault(); if (status === "sending") return; setStatus("sending"); setError(""); try { const res = await fetch("/contact/submit.php", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ ...form, company_url: hpRef.current ? hpRef.current.value : "" }), }); let data = {}; try { data = await res.json(); } catch (_) { /* non-JSON response */ } if (res.ok && data.ok) { setSubmitted(true); setStatus("idle"); } else { setStatus("error"); setError(data.error || "Something went wrong. Please try again."); } } catch (_) { setStatus("error"); setError("We couldn't reach the server. Please try again, or email info@activemanage.co.uk."); } }; return (
Whether you have a brief, a question, or want a 30-minute platform tour — we read everything that comes through this form.
We'll be in touch within one working day at {form.email || "your inbox"}.