Switch from Web3Forms

Move a Web3Forms contact form to SilentForms by changing its URL. Field names and JSON responses keep working; no submission limits.

SilentForms accepts Web3Forms-style forms as they are: the same field names, the same key-in-the-URL option and the same success and message keys in JSON responses. For most forms the switch is two edits, the endpoint URL and the access key, and nothing else in your HTML or JavaScript has to change.

Step by step#

  1. Get a SilentForms access key. Enter your email on the access key page and click the confirmation link. Your Web3Forms key does not work here, because the keys are issued separately.
  2. Replace the endpoint and the key. Use the table below. Keep the field name access_key: SilentForms accepts it as an alias of accessKey.
  3. Test. Submit the form from your site and check that the email arrives and that the success message or redirect still appears.
  4. Optional: set up the dashboard. Sign in with the same email to see submissions, export them, restrict the form to your domain or turn on a CAPTCHA. See the dashboard.

Find and replace#

Web3FormsSilentForms
https://api.web3forms.com/submithttps://silentforms.com/api/submit
https://api.web3forms.com/submit/YOUR_KEYhttps://silentforms.com/api/submit/YOUR_ACCESS_KEY_HERE
access_key value: your Web3Forms keyaccess_key value: your SilentForms key

When the key is in the URL, SilentForms uses it even if the form also sends an access_key field.

Before and after#

A Web3Forms HTML form:

<form action="https://api.web3forms.com/submit" method="POST">
  <input type="hidden" name="access_key" value="YOUR_WEB3FORMS_KEY">
  <input type="hidden" name="subject" value="New contact form message">
  <input type="hidden" name="redirect" value="https://example.com/thanks">
  <input type="text" name="name" required>
  <input type="email" name="email" required>
  <textarea name="message" required></textarea>
  <input type="checkbox" name="botcheck" class="hidden" style="display: none;">
  <button type="submit">Send</button>
</form>

The same form on SilentForms. Only the first two lines changed:

<form action="https://silentforms.com/api/submit" method="POST">
  <input type="hidden" name="access_key" value="YOUR_ACCESS_KEY_HERE">
  <input type="hidden" name="subject" value="New contact form message">
  <input type="hidden" name="redirect" value="https://example.com/thanks">
  <input type="text" name="name" required>
  <input type="email" name="email" required>
  <textarea name="message" required></textarea>
  <input type="checkbox" name="botcheck" class="hidden" style="display: none;">
  <button type="submit">Send</button>
</form>

For a JavaScript form, change the URL and the key the same way. Code like this keeps working, because the response has a top-level message and an HTTP 200 status on success:

const formData = new FormData(form);
formData.set('access_key', 'YOUR_ACCESS_KEY_HERE');

const response = await fetch('https://silentforms.com/api/submit', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json', Accept: 'application/json' },
  body: JSON.stringify(Object.fromEntries(formData)),
});
const json = await response.json();
result.textContent = json.message;
if (json.success) form.reset();

Fields that work unchanged#

FieldWhat SilentForms does with it
access_keyYour access key (alias of accessKey).
emailThe visitor's address: shown in the email and used as Reply-To.
subjectSubject line of the email you receive.
from_nameSender display name, shown as "your name via SilentForms".
replytoReply-To address when it should differ from email.
redirectWhere an HTML form post goes after success. Must be an absolute https:// or http:// URL.
webhookA URL that also receives each submission as JSON. See Webhooks.
botcheckHoneypot. A submission with a value here gets a normal success response but is not emailed; it waits in the dashboard's spam view for 7 days.
h-captcha-responsehCaptcha token, checked when hCaptcha is turned on for the form (see below).

Every other named field is emailed to you in form order, as on Web3Forms.

Response differences#

Both services return success (true or false) and a message, so clients that read json.success, json.message or the HTTP status keep working. The differences are in the details:

  • Web3Forms' API reference shows the submitted data and the message nested under a body object. SilentForms returns a flat object and does not echo the submitted data. If your code reads json.body.message or json.body.data, change it to json.message and use your own form data.
  • SilentForms also includes ok, status and, on errors, an errors array, so the same response suits Formspree-style code.
  • The messages themselves are worded differently, for example "Form submitted successfully." If your code compares message text, compare json.success instead.

The exact shapes are in Responses, and every error message is listed in Errors.

hCaptcha#

If your form has an hCaptcha widget, SilentForms needs the secret key to verify it:

  • Your own hCaptcha site: keep the widget and its data-sitekey as they are. In the SilentForms dashboard, turn on hCaptcha for the form and paste the same site's secret key.
  • The site key Web3Forms provides: that key belongs to Web3Forms' hCaptcha account, so you cannot get its secret. Create your own site in hCaptcha, replace the data-sitekey, then save its secret in the dashboard.

Put the widget on the page before you turn CAPTCHA on, or every submission is refused with "Captcha is required." Step-by-step: hCaptcha.

CC recipients#

ccemail is accepted, but SilentForms sends copies only to people who agreed to receive them: add each address as an extra recipient in the dashboard, and they confirm from their own inbox. An address that only appears in the field gets nothing.

Not supported yet#

  • File attachments: file inputs are ignored. Remove them or link to a file-sharing service instead.
  • Autoresponder: SilentForms does not send an automatic reply to the visitor.

Next steps#