HTML Form Builder
WM-124Add fields, give each one a label, mark the ones that are required and put them in order. The HTML updates as you go, with a live preview beside it.
Runs in your browser. Nothing is uploaded.
Fields
No fields yet. Pick a field type and press Add field, or press Sample.
Your form is saved in this browser only. Clear removes it.
Form
How to use it
- Pick a field type and press Add field, or press Sample to load a contact form.
- Type a label for each field, and a name, placeholder or options where you need them.
- Tick Required where an answer is needed, and use Up and Down to reorder fields.
- Set the button text, method and action, then copy or download the HTML.
Accessible by default
Every field gets a visible label joined to it with for and id, so clicking the label focuses the field and screen readers read the label aloud. Radio buttons are grouped in a fieldset with the field label as its legend. Required fields get the required attribute, and the star after the label is hidden from screen readers so it is not read out as a word. Email fields get autocomplete set to email.
What the code does not do
The output is plain HTML with no script. It does not send email, store answers or block spam. Set Action to the address of the server script or form service that will receive the answers. Browser checks from required and type email are a first step only, so your server should check every answer again. The preview frame cannot send the form anywhere, even when you press its button.
Error messages and what to do
| Message | What it means | Fix |
|---|---|---|
Field 1 has no label. Every field needs a label so screen readers can name it. | The first field has an empty label. The number shows which field to fix. | Type a label for that field. Every field needs one. |
Questions people ask
How are field names chosen?
From the label, unless you type a name yourself. Accents are dropped and spaces become underscores, so First name becomes first_name. A second field with the same name gets _2, a third _3. A label with no Latin letters gets a name such as field_3.
Can I style the form?
Yes. Tick Include basic CSS for a short style block that spaces the fields, puts labels above them and widens text inputs. Or leave it off and style the form with your own site CSS. Each field sits in a div with the class form-field, which gives you a hook.
Where do the answers go?
To the address you type in Action, using POST or GET. This tool only writes the HTML, so you need a server script or a form service at that address to receive and store the answers. With Action empty, the browser sends the form to the page it is on.
How many fields can a form have?
Up to 100 fields. Each field can be moved up or down, and removed with its Remove button. Your form, settings and field order are saved in this browser, so they are still there if you close the tab.
Is my form uploaded?
Nothing is uploaded. The builder runs in your browser, and your form is saved only in this browser's local storage so it is there when you come back. Clear removes it. Share link puts the form in the link itself, so only people you send it to can open it.
About this tool
Every field gets a visible label tied to it with for and id, required fields get the required attribute and a star that screen readers skip, and radio buttons are grouped in a fieldset with a legend. Names come from the label unless you type one, and repeated names get _2, _3. All text is escaped. The output is plain HTML with no script, so checking the answers and sending them is up to your own server; the preview cannot send the form anywhere. Your form is kept in this browser only.