HTML forms
Connect a plain HTML form to Nisuform with the action attribute. No JavaScript, server or build step needed.
Any HTML form can send submissions to Nisuform. Set the form's action to your endpoint and its method to POST.
<form action="https://api.nisuform.com/s/YOUR_FORM_KEY" method="POST">
<label for="name">Name</label>
<input id="name" type="text" name="name" required>
<label for="email">Email</label>
<input id="email" type="email" name="email" required>
<label for="message">Message</label>
<textarea id="message" name="message" rows="5" required></textarea>
<input type="text" name="_gotcha" tabindex="-1" autocomplete="off" style="display:none">
<button type="submit">Send</button>
</form>Copy your endpoint from the form's Setup tab, or from Settings, Endpoint.
Name every field
The browser only sends inputs that have a name. The name becomes the key the answer is saved under, and the inbox shows it as the label unless your form builder gives the field a nicer one.
- If your form has fields in the form builder, use the same names so Nisuform can validate the answers. The Field name of each field is shown in the builder.
- Inputs that the builder does not list are still saved as they are. You never lose data because of a missing field.
- Names that start with an underscore, like
_gotcha, control how Nisuform handles the submission and are not saved. See Special fields.
Multiple values
Checkboxes that share a name, and names that end in [], are saved as one comma-separated answer:
<fieldset>
<legend>Topics</legend>
<label><input type="checkbox" name="topics[]" value="Design"> Design</label>
<label><input type="checkbox" name="topics[]" value="Development"> Development</label>
<label><input type="checkbox" name="topics[]" value="Marketing"> Marketing</label>
</fieldset>Checking the first two saves topics as Design, Development.
Hidden fields
Use hidden inputs to record where a submission came from. They are saved like any other field:
<input type="hidden" name="source" value="pricing-page">
<input type="hidden" name="plan" value="team">Nisuform also records the page the form was sent from on its own. The inbox shows it as Page on every submission.
What visitors see
After a normal browser submit, Nisuform answers with a thank-you page that links back to the page the visitor came from. On Pro you can replace it with your own title and message or redirect to a page on your site. See Thank-you page and redirects.
If a submission is rejected, for example because the form is closed or the visitor sent too many requests, the visitor sees a short page that explains why, with a link back to your site.
File inputs
To accept files, the form needs enctype="multipart/form-data" and file uploads must be turned on for the form. Uploads are a Pro feature. See File uploads.
Sizes and limits
- Up to 50 fields per submission. Extra fields are ignored.
- Field names up to 200 characters.
- Values up to 10,000 characters. Longer values are cut at 10,000.
- The whole request can be up to 200 KB, or 25 MB on forms that accept file uploads.
Opening the endpoint in a browser
The endpoint only accepts POST. If you open it in a browser tab you see a short page that explains it is a form endpoint, with status 405. That is expected and does not mean anything is broken.