Gravity Forms Webhook to Static Forms: Setup Guide

6 min read
Static Forms Team
wordpressgravity formstutorial
Share:

Gravity Forms builds the form and runs its logic. Static Forms can receive the submission from there and handle delivery: the notification email, the spam filter, the Inbox and your integrations. You keep the Gravity Forms builder, and the entry reaches a Static Forms inbox that doesn't depend on your WordPress host's mail setup.

This guide covers two ways to connect Gravity Forms. A Gravity Forms add-on feed sends only the fields you pick. If you post the Gravity form's own HTML straight to Static Forms with no feed, Gravity Forms hidden inputs such as gform_submit and state_12 arrive too, and they can land in your notification email. Static Forms has a preset that hides them.

We make Static Forms, the form backend in the examples. Gravity Forms is a separate WordPress plugin, and its menus can change between versions, so check each Gravity Forms label against the Gravity Forms add-on documentation.

What you need

Step 1: Copy your form's API key

Open the form in Static Forms and go to the General tab. The key is shown read-only with a copy button. It identifies the form and is not a secret: it lets a request submit to your form but can't read submissions. The General tab docs describe it.

Step 2: Create the Gravity Forms feed

In WordPress, open the Gravity Forms form and go to Settings → Webhooks → Add New. Set the feed like this:

Setting Value
Name Static Forms
Request URL https://api.staticforms.dev/submit
Request Method POST
Request Format JSON
Request Body Select Fields

Under the field values, add one row per key Static Forms should receive:

Key Value
apiKey Custom value: your form's API key
name The form's name field
email The form's email field
message The form's message field

Name the keys the way you want them to read in the email. Static Forms shows every other key as a regular field. A key named email also becomes the reply-to address of the notification, so replying writes back to the visitor. The API reference lists the fields with special handling.

Choose Select Fields rather than All Fields. It lets you name each key and add the apiKey row.

An upload field arrives as the file URL as text (a list for multi-file fields), not as an attachment.

Step 3: Send a test entry

Submit the form on your site. A test message should arrive by email and show up in the Inbox of the form in the app. If nothing arrives, the Inbox tells you whether the request reached Static Forms. The troubleshooting section below covers the common errors.

If you post the form HTML directly

This section is optional. A Select Fields feed sends only the keys you named, so the hidden inputs below never reach Static Forms. Read on only if you post the Gravity form's own HTML to Static Forms with no feed.

Setup is two lines in the form markup: set the form action to https://api.staticforms.dev/submit, and add a hidden input named apiKey with your form's key.

Gravity Forms puts hidden inputs into its form markup, among them gform_submit, is_submit_<id>, state_<id> and version_hash, and a direct post sends them along. They show up as fields in the notification email. You can hide them, and the setting is on the form's General tab, under Hide fields from notification emails.

  1. Open the form in Static Forms and go to General.
  2. Find Hide fields from notification emails.
  3. Click Add WordPress / Gravity Forms fields.

The preset adds these names: gform_*, is_submit_*, state_1 to state_9, version_hash and _ssp_*.

The preset stops at state_9. Gravity Forms names the field after the form ID, so for a form with an ID of 10 or above, add state_<form id> yourself, such as state_12.

How matching works, from the docs:

  • A name matches exactly and ignores case.
  • A trailing * matches a prefix, so gform_* hides gform_theme.
  • Commas and new lines separate names. A name may contain spaces.
  • The list holds up to 100 names of up to 100 characters each.

Only the notification email changes. Hidden fields are still saved, and they still reach the Inbox, the CSV export, webhooks, integrations, the auto-responder and AI Reply. A field you reference with a {{placeholder}} in a custom template or subject still shows.

Conditional logic stays in Gravity Forms

Static Forms doesn't read or rebuild Gravity Forms conditional logic. Show and hide rules, conditional confirmations and multi-page behavior run inside Gravity Forms. Static Forms receives the keys your feed sends and treats them as a flat list of fields. If a field must reach the email only in certain cases, build that rule in Gravity Forms. Static Forms form rules work on the data Static Forms receives, which is a separate layer.

Troubleshooting

"Invalid API key" or "API key is required"

The apiKey key is missing from the feed, or the value has a stray space. Copy the key from the General tab again.

403 "is not in the allowed domains list" or "Unable to determine origin domain"

Domain restriction is a Starter and up setting, so a Free form never returns this error. If it is on for the form, note that the feed posts from your WordPress server, not from a visitor's browser, so the request carries no browser origin. Our WordPress plugin sends the site URL as Origin and Referer headers for this reason. In the feed's Request Headers, add the same two headers with your site address, such as https://www.example.com, and add that domain to the form's allowed domains. See domain restriction.

The email is full of `state_` and `gform_` fields

This happens when the Gravity form's HTML is posted directly to Static Forms, or when you chose All Fields: switch to Select Fields. A Select Fields feed doesn't send them. For a direct post, apply the hide-fields steps in If you post the form HTML directly. For a form ID of 10 or above, add state_<form id>.

The submission reached the Inbox but no email arrived

Check your spam folder, then the form's notification settings. The submission was accepted, so the problem is on the delivery side. The delivery docs cover it.

FAQ

Does Static Forms have a Gravity Forms plugin?

No. The Static Forms WordPress plugin has adapters for Contact Form 7 and Elementor Pro. Gravity Forms sends its entries to the Static Forms endpoint through its own feed settings.

Can I use the plain HTML endpoint instead?

Yes. Any sender that can POST fields and an apiKey to https://api.staticforms.dev/submit works. The API reference lists the content types and fields.

Next steps

Create a free Static Forms account, copy your form's API key, and add the feed in Step 2. Send a test entry before you rely on it.