Form with every option

One HTML form using every special field: subject, sender name, reply-to, redirect, webhook, honeypot and checkbox groups.

Most forms only need an access key and a few fields. This example goes the other way and uses every special field SilentForms understands, so you can see them side by side and copy the ones you need. Special fields change how the submission is delivered; they are removed from the data, so they never show up as rows in your email.

The form#

<form action="https://silentforms.com/api/submit" method="POST">
  <!-- Routing -->
  <input type="hidden" name="accessKey" value="YOUR_ACCESS_KEY_HERE">

  <!-- How the email looks -->
  <input type="hidden" name="subject" value="New enquiry from example.com">
  <input type="hidden" name="from_name" value="Example Co website">

  <!-- Where replies go (overrides the visitor's email for Reply-To) -->
  <input type="hidden" name="replyto" value="[email protected]">

  <!-- Where the visitor goes after a successful plain HTML post -->
  <input type="hidden" name="redirect" value="https://example.com/thanks">

  <!-- Also POST the submission as JSON to your endpoint -->
  <input type="hidden" name="webhookUrl" value="https://hooks.example.com/forms/9f2c41d7b8">

  <!-- Visitor's data -->
  <label for="name">Name</label>
  <input id="name" name="name" type="text" autocomplete="name" required>

  <label for="email">Email</label>
  <input id="email" name="email" type="email" autocomplete="email" required>

  <fieldset>
    <legend>What are you interested in?</legend>
    <label><input type="checkbox" name="interests[]" value="Design"> Design</label>
    <label><input type="checkbox" name="interests[]" value="Development"> Development</label>
    <label><input type="checkbox" name="interests[]" value="Hosting"> Hosting</label>
  </fieldset>

  <label for="message">Message</label>
  <textarea id="message" name="message" rows="5" required></textarea>

  <!-- Honeypot: hidden from people, ticked by bots -->
  <input type="checkbox" name="botcheck" style="display: none;" tabindex="-1" autocomplete="off">

  <button type="submit">Send</button>
</form>

With this form, a visitor who ticks Design and Hosting produces an email with the subject "New enquiry from example.com", from "Example Co website via SilentForms", with the rows name, email, interests ("Design, Hosting") and message. Replies go to [email protected], the visitor lands on /thanks, and your webhook receives the same data as JSON.

Every field explained#

FieldWhat it doesNotes
accessKeyRoutes the submission to the key's owner.Required. access_key also works, or put the key in the URL.
subjectSubject line of the email.Line breaks removed, max 200 characters. _subject also works. Default: "New form submission from" plus your site's host.
from_nameDisplay name of the sender, shown as "your text via SilentForms".The sending address never changes, so the email keeps passing SPF and DMARC. Max 100 characters.
emailThe visitor's address. Shown in the submission and used as Reply-To.Must be a valid address, or the submission is rejected.
replytoReply-To address when it should differ from email.Validated. _replyto and replyTo also work.
redirectAbsolute http(s) URL to send the visitor to after a successful HTML post.Ignored for JSON requests, which get JSON. _next also works. A redirect URL saved in the dashboard overrides it.
webhookUrlAbsolute public http(s) URL that also receives the submission as JSON.Private and reserved addresses are refused. webhook also works. A webhook URL saved in the dashboard overrides it.
botcheckHoneypot. Any value other than empty or "false" marks the submission as spam.The visitor still sees success; nothing is emailed. honeypot and _gotcha also work.
interests[]Ordinary data field. The [] suffix makes it a list.Arrives as interests. Email shows "a, b, c"; webhooks get a JSON array.

Any field not in this table, such as name and message, is the visitor's data and is emailed in the order it appears in the form.

When the dashboard overrides the form#

Two settings can also be saved per form in the dashboard: the redirect URL and the webhook URL. When one is saved there, it wins over the matching hidden field.

That matters most for the webhook. Anything in your HTML is public, and SilentForms webhooks carry no signature, so the URL itself is the secret. Saving it in the dashboard keeps it out of the page source. The webhookUrl field is handy for quick tests or when you have no account, but treat any URL you put there as visible to everyone.

Checkbox groups#

Repeating a name keeps every ticked value, with or without the brackets. The [] suffix guarantees a list even when only one box is ticked, which keeps webhook consumers simpler: they always get an array. A box that nobody ticks sends nothing at all, so the field is simply missing. See Checkboxes and multi-select.

Fields that are accepted but do nothing#

_format, _language, _template and _template_id are accepted and ignored, so forms written for other services do not break. CC fields (ccemail, _cc) and file inputs are not supported: CC fields arrive as ordinary data, and files are dropped.

Next steps#