Form previewSubmissions stay in this preview
Use this template
This sample formats ten-digit national numbers when the field loses focus. For international audiences, remove the formatter and accept country codes so users can enter their local format.
Copy the code
Replace the example origin and access key with the values from your form’s setup screen. Send a test message from each site you publish and check the submission in your inbox.
HTML
<form action="https://api.bitebrake.com/api/submit" method="post">
<input type="hidden" name="access_key" value="YOUR_FORM_ACCESS_KEY">
<label>Name <input name="name" autocomplete="name" required></label>
<label>Email <input name="email" type="email" autocomplete="email" required></label>
<label>Message <textarea name="message" rows="5" maxlength="4000" required></textarea></label>
<label>US or Canadian phone number
<input id="contact-phone" name="phone" type="tel" inputmode="tel" autocomplete="tel-national" aria-describedby="phone-hint">
</label>
<p id="phone-hint">A ten-digit number, with area code.</p>
<div hidden><label>Leave empty <input name="botcheck" tabindex="-1" autocomplete="off"></label></div>
<button type="submit">Send message</button>
</form>
<script type="module">
const phone = document.querySelector("#contact-phone");
phone.addEventListener("blur", () => {
const digits = phone.value.replace(/\D/g, "");
const local = digits.length === 11 && digits.startsWith("1") ? digits.slice(1) : digits;
if (local.length !== 10) return;
phone.value = local.slice(0, 3) + "-" + local.slice(3, 6) + "-" + local.slice(6);
});
</script>