const fieldStyle = { width: '100%', background: '#0c0c0c', border: '1px solid #2a2a2a', color: '#fff', padding: '14px 16px', fontFamily: 'var(--font-body)', fontSize: 15, borderRadius: 0, outline: 'none' }; const labelStyle = { display: 'block', fontFamily: 'var(--font-display)', fontSize: 11, letterSpacing: 1.4, textTransform: 'uppercase', color: 'var(--ash)', marginBottom: 9 }; function ContactForm() { const [d, setD] = React.useState({ name: '', contact: '', msg: '' }); const [sent, setSent] = React.useState(false); const [sending, setSending] = React.useState(false); const [error, setError] = React.useState(''); const set = (k) => (e) => setD(p => ({ ...p, [k]: e.target.value })); /* Show the success screen when FormSubmit returns the visitor here. */ React.useEffect(() => { try { if (new URLSearchParams(window.location.search).get('sent') === '1') setSent(true); } catch (err) { /* ignore */ } }, []); /* Submitted natively by the BROWSER, not by JavaScript fetch(). The fetch() approach was being rejected before it ever reached FormSubmit ("Connection issue"), because cross-origin JavaScript requests get blocked by ad blockers, privacy extensions and content-security policies. A normal form post is not. */ const submit = (e) => { if (!d.name.trim() || !d.contact.trim()) { e.preventDefault(); return; } if (!FORM_KEY) { e.preventDefault(); setError('The form is not configured yet — please contact us on WhatsApp or by phone.'); return; } setSending(true); // no preventDefault — the browser posts the form from here }; if (sent) return (
Thank you — your message has been sent directly to us. We'll get back to you shortly.
Questions, quotes or bookings — we'll always come back to you quickly. The fastest way to reach us is a call or WhatsApp.
Mobile across {AREAS.slice(0, 6).join(', ')} and surrounding Staffordshire areas.