How to Connect HTML5 Forms to Form2Lead
Step-by-step developer instructions for HTML5 applications.
How do you send HTML5 form submissions to Form2Lead?
Connect any plain static HTML5 webpage form to Form2Lead by putting your Form2Lead endpoint URL in the form `action` attribute with `method="POST"`.
Why use Form2Lead with HTML5?
Plain HTML pages cannot process server-side POST requests on their own. Form2Lead gives you a working form backend in 30 seconds: set the form action to your endpoint, add a `_gotcha` honeypot field, and every submission is validated, spam-checked, emailed, and stored — with zero JavaScript.
Prerequisites
- ✔Static HTML webpage
- ✔Form2Lead endpoint URL
Step-by-Step Integration Guide
01. Set Form Action
Set your form element action attribute to your Form2Lead URL.
<form action="https://form2lead.com/api/v1/f/YOUR_FORM_ID" method="POST"> <input type="text" name="name" placeholder="Full Name" required /> <input type="email" name="email" placeholder="Email Address" required /> <textarea name="message" placeholder="How can we help?" required></textarea> <button type="submit">Send</button> </form>
02. Add the Invisible Honeypot Field
Add a hidden `_gotcha` input so Form2Lead silently drops automated bot submissions.
<input type="text" name="_gotcha" style="display:none !important" tabindex="-1" autocomplete="off" />
03. Lock Down Allowed Domains
In your Form2Lead form settings, add your site origin (for example `example.com`) to Allowed Domains so only your pages can post to the endpoint.
HTML5 Integration FAQ
Does plain HTML form submit require JavaScript?
No. Standard browser POST submission works out of the box without a single line of JavaScript.