> ## Documentation Index
> Fetch the complete documentation index at: https://formcarry.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# WordPress

> A WordPress page sends its form to formcarry from a Custom HTML block, because the block editor has no form block of its own.

You paste a plain HTML form into the block, and the visitor's browser posts it to the endpoint like any HTML form.

## Prerequisites

Before you start, you need:

* A formcarry account. [Sign up](https://app.formcarry.com/register) is free.
* A form in the [dashboard](https://app.formcarry.com). Its endpoint is on the form's Setup page. The examples use `https://formcarry.com/s/AbC123xyz`; put yours in its place.

## 1. Add a Custom HTML block

In the block editor, click the **Block Inserter** icon and choose **Custom HTML**. Typing `/html` in a new paragraph block adds one too.

## 2. Paste the form into the block

Click **Edit HTML** and paste a form whose `action` is your endpoint and whose `method` is `POST`:

```html theme={null}
<form action="https://formcarry.com/s/AbC123xyz" method="POST">
  <input type="email" name="email" placeholder="Email">
  <textarea name="message" placeholder="Message"></textarea>
  <button type="submit">Send</button>
</form>
```

The preview to the right of the code shows the form. Set `method="POST"` rather than leaving the default, otherwise the browser sends a GET and formcarry answers with a page that says GET is not allowed. The [Quickstart](/docs/quickstart) has the rest.

## 3. Save the page as an Administrator or Editor

Press **Update** signed in as an Administrator or Editor rather than as a user without the `unfiltered_html` capability, otherwise WordPress removes the form on save.

It runs the block through `wp_kses()` for those users, and `form` is not among the tags it allows by default. On a single site, Administrators and Editors have the capability; on a multisite, only Super Admins do.

<Note>
  On WordPress.com, the `form`, `input` and `textarea` tags need a paid plan with hosting features activated; the free plan filters them out.
</Note>

## Field names

The `name` of each input in the HTML you pasted is the field name formcarry stores; WordPress adds none and renames none.

Give every field a `name` rather than an `id` alone, otherwise the browser leaves it out of the request. Name the visitor's address field `email` rather than `contact` or `your address`, otherwise replying to the notification email goes nowhere and the auto response is not sent.

To collect more than an address and a message, add fields with a `name` each:

```html theme={null}
<form action="https://formcarry.com/s/AbC123xyz" method="POST">
  <label>Name <input type="text" name="name"></label>
  <label>Email <input type="email" name="email"></label>
  <label>Topic
    <select name="topic">
      <option value="sales">Sales</option>
      <option value="support">Support</option>
    </select>
  </label>
  <label>Message <textarea name="message"></textarea></label>
  <button type="submit">Send</button>
</form>
```

The submission arrives with `name`, `email`, `topic` and `message`, and `topic` holds the `value` of the chosen option.

## After the visitor submits

The browser posts the form itself, so the visitor lands on formcarry's thank you page, or on the form's redirect URL if you set one in the dashboard.

To send the visitor to a page on your site instead, set the form's thank you URL in the dashboard, or, on paid plans, add a hidden `_next` input to the form:

```html theme={null}
<input type="hidden" name="_next" value="https://example.com/thanks">
```

`_next` applies only when the form's thank you URL in the dashboard is empty, otherwise the dashboard URL wins.

## Files

A file input works as in any HTML form. To accept one, set `enctype="multipart/form-data"` on the form tag:

```html theme={null}
<form action="https://formcarry.com/s/AbC123xyz" method="POST" enctype="multipart/form-data">
  <input type="email" name="email" placeholder="Email">
  <input type="file" name="attachment">
  <button type="submit">Send</button>
</form>
```

Files are stored on paid plans; on the free plan the rest of the submission is stored without them. See [What every form needs](/docs/what-every-form-needs).

## Spam blocker

The block adds no spam protection of its own. For a honeypot, add a hidden text input named `_gotcha` inside the form and leave it empty:

```html theme={null}
<input type="text" name="_gotcha" style="display:none" tabindex="-1" autocomplete="off">
```

A submission that fills it is marked as spam.

For a challenge, paste the vendor's script tag and widget `div` from the [JavaScript](/docs/frameworks/javascript) page into the same block, and paste the secret key into the form's settings under Form Security. With reCAPTCHA v2:

```html theme={null}
<script src="https://www.google.com/recaptcha/api.js" async defer></script>

<form action="https://formcarry.com/s/AbC123xyz" method="POST">
  <input type="email" name="email" placeholder="Email">
  <textarea name="message" placeholder="Message"></textarea>
  <!-- inside the form, before the submit button -->
  <div class="g-recaptcha" data-sitekey="SITE_KEY"></div>
  <button type="submit">Send</button>
</form>
```

The widget adds a field named `g-recaptcha-response` to the form, so the browser sends it with the rest.

For hCaptcha and Turnstile, take the script and widget class from the table on the JavaScript page; reCAPTCHA v3 has no widget and needs the script from the same page.

If you run WordPress on your own machine, add `localhost` to the challenge's allowed domains while you test.

## Test it

Open the published page on your site, fill the form in and submit it once. The submission is on the form's page in the dashboard, and the notification email arrives at your account's address.

Wait 15 seconds before a second test from the same address, otherwise formcarry refuses it.

## Form plugins

WPForms, Gravity Forms, Ninja Forms, Fluent Forms and Formidable Forms post to a custom URL only through a paid add on or a paid license, so this page does not cover them.

The Elementor Pro form widget lists Webhook among its form actions; this page does not cover it either.

## What's next

* [What every form needs](/docs/what-every-form-needs): field names, hidden inputs, limits and the answers.
* [Thank you pages](/docs/features/thank-you-pages): what the visitor sees after submitting.
* [Spam protection](/docs/features/spam-protection): the challenges, the filter and the honeypot.

Stuck? Write to [help@formcarry.com](mailto:help@formcarry.com). Include the form id.


## Related topics

- [Quickstart](/docs/quickstart.md)
- [Introduction](/docs/introduction.md)
- [Custom HTML Email Templates for Form Notifications](/docs/email/custom-email-templates.md)
- [What every form needs](/docs/what-every-form-needs.md)
- [Replit](/docs/ai/replit.md)
