Skip to content

Forms Integration

Note: This functionality is part of Staatic Premium and requires an active subscription. Connect your Staatic account before enabling form handling.

Introduction

Staatic Forms provides a dynamic backend for forms on a static site. During publication, Staatic prepares supported forms so visitors submit directly to Staatic’s form endpoint instead of posting back to WordPress.

Use Forms Integration when your static site still needs contact forms, lead forms, or other simple form submissions after WordPress has been published statically.

Supported use cases include:

  • simple HTML forms;
  • nested fields using [] notation;
  • file attachments;
  • forms rendered by supported WordPress form plugins.

Server-side or plugin-managed multi-page form workflows are not supported. A client-side step interface can work if it renders one final static HTML form and submits all required fields in a single request to Staatic Forms.

Requirements

Forms Integration depends on Premium account state and a connected Staatic account.

Requirement Why it matters
Staatic Premium The integration module is Premium-only.
Active subscription Integration hooks are only enabled for active subscriptions.
Connected Staatic account Staatic needs account access to create forms, sync notifications and configure the submission endpoint during publication.

How forms integration works

Forms Integration has a publication-time part and a runtime part.

Phase Behavior
WordPress render Supported plugin integrations add Staatic metadata to the form markup.
Static publication Staatic finds forms marked with data-staatic, creates or looks up the form in Staatic and rewrites the form action to the Staatic endpoint.
Visitor submission The static form posts to Staatic Forms. WordPress is not involved in the submission request.
Backend processing Staatic stores the submission, validates spam controls and processes configured notifications after verification.

Submissions are stored in Staatic’s backend, not as local WordPress posts. The WordPress admin views under Staatic > Forms read and update that API-backed data.

Enabling form handling

In order to receive form submissions, forms need to be integrated with Staatic Forms. This can be done automatically for supported plugins, or manually when you control the form markup.

Automatic integration

Automatic form integration is available for the following WordPress form plugins:

To enable automatic integration, head over to the WordPress Admin and click Staatic > Settings > Integration. Make sure Enable forms integration with popular WordPress plugins is checked.

The Integration tab of the Staatic settings with Enable forms integration with popular WordPress plugins checked, for Contact Form 7, Divi Contact Form, Gravity Forms and WPForms.

Automatically integrated forms receive Staatic form metadata and a honeypot field. For supported plugins, Staatic also disables frontend AJAX assumptions where needed so the static form can submit directly to Staatic Forms.

Ninja Forms is not supported because it relies on AJAX behavior that cannot be handled as a static HTML form submission.

Contact Form 7 integration

In order for Staatic to uniquely identify forms, make sure the shortcode includes the form ID. If a title is present, Staatic uses it; otherwise Staatic looks up the Contact Form 7 title by ID.

[contact-form-7 id="123" title="My Contact Form"]

The form title is used to identify the form in the Staatic dashboard and in notifications.

Manual integration

If you cannot use automatic integration, or need full control over the available form handling options, you can manually integrate your forms with Staatic Forms.

Within the HTML code of the form, make sure the <form> tag has a name attribute with the name of the form, as well as the data-staatic attribute with any value, for example:

<form data-staatic="true" name="Contact Form">
    <input name="name" placeholder="Your name" type="text">
    <input name="email" placeholder="Your email address" type="email">
    <input type="submit" value="Submit">
</form>

The following additional <form> attributes are available:

Redirect URL (data-staatic-redirect-url)

By default, a thank-you page is shown after a form is submitted. To redirect visitors to your site instead, set the data-staatic-redirect-url attribute to the URL to redirect to.

Example:

<form data-staatic="true" data-staatic-redirect-url="https://example.com/thank-you/" name="Contact Form">
    ...
</form>

For a newly discovered form, this creates the form in Staatic with redirect behavior. If the form already exists, adjust the response type and redirect URL under Staatic > Forms > Details.

Honeypot (data-staatic-honeypot)

To reduce the amount of spam, add a hidden field to the page containing the form and use the data-staatic-honeypot attribute with the value of the hidden field.

Example:

<form data-staatic="true" data-staatic-honeypot="honeypot_123" name="Contact Form">
    ...
    <input name="honeypot_123" style="display: none;" type="text" tabindex="-1" autocomplete="off">
</form>

Manual forms must include the honeypot field themselves. The data-staatic-honeypot attribute tells Staatic which submitted field should remain empty.

Note: hide honeypot fields in a way that remains accessible and does not invite real visitors to fill them. Simple inline display: none examples are easy to understand but may be easier for bots to detect.

Setting up notifications

To get notified of new form submissions, set up one or more notification settings.

Note: Notification settings are available after your Staatic account credentials are configured.

  1. Go to the WordPress Admin and click Staatic > Settings > Integration.
  2. Click Add form notification.
  3. Select the Form that this notification setting applies to, or select Any form to apply it to all forms.
  4. Choose the Notification type, which can be Email, Autoresponse or Webhook.
  5. Configure the fields for the selected notification type.
  6. Click Save Changes.

Staatic form notifications for a Contact form: an email to the team's address, an autoresponse with a thank-you template and a webhook, each with a Delete button, above Add form notification.

Notification type Required configuration Behavior
Email One or more comma-separated recipients. Sends a notification email to the configured recipients.
Autoresponse Autoresponse template. Sends an email to the submitter when an email address is available in the submission.
Webhook Valid webhook URL. Posts submission data to the configured URL.

Notifications are processed only for verified submissions. Check form submissions occasionally to review spam and failed expectations.

Managing forms

Forms identified by Staatic can be managed in the WordPress Admin by going to Staatic > Forms.

Viewing & modifying identified forms

The Forms section of Staatic lists all forms identified and managed by Staatic. Hover over the name of a form and click Details to view its details.

On the Details page, you can adjust some of the form’s properties, including:

Property Purpose
Name The form name used for identification and notifications.
Response Type Either show the Staatic thank-you page or redirect to a configured URL.
Honeypot field The submitted field that should remain empty.
reCAPTCHA secret Secret used to validate g-recaptcha-response for forms with reCAPTCHA enabled.

If you change a manually integrated form’s redirect behavior after it has already been discovered, update the form details here rather than relying on publication to update the existing form in Staatic.

Managing form submissions

Form submissions handled by Staatic can be managed in the WordPress Admin by going to Staatic > Forms. Hover over the name of the form and click Submissions to view its submissions.

Here you can view verified submissions and submissions identified as spam. Submission details include submitted fields, request metadata such as referrer information, and file-like values as downloadable links where available.

Submission statuses are:

Status Meaning
New Submission has been received and is waiting for validation.
Verified Submission passed validation and can trigger notifications.
Spam Submission was rejected by honeypot, reCAPTCHA, Akismet or another spam check.

You can mark submissions as spam or verified from the submissions table. This is useful when reviewing borderline submissions or correcting a spam classification.

To download the submissions of a form as a spreadsheet, see Exporting Form Submissions.

Uploaded files are supported. Staatic’s backend accepts files up to 20 MiB per uploaded file, but browser, network, and Staatic edge/API limits may still affect whether an upload succeeds.

Using Zapier and webhooks

Send verified submissions on to other tools in one of two ways: the Staatic app on Zapier, or a webhook notification for any other service.

Using the Staatic app on Zapier

The Staatic app on Zapier has a New Form Submission trigger. It is an instant trigger: Zapier receives each verified submission as soon as Staatic has checked it.

  1. Publish your site with form handling enabled, and send a test submission from one of its forms.
  2. In Zapier, create a Zap and choose Staatic with the New Form Submission trigger.
  3. Connect your Staatic account: sign in and allow Zapier to manage your sites and forms. Zapier shows the sites of the account you are signed in to.
  4. Under Configure, select the Site. Optionally select a Form; leave it empty to receive submissions from every form on that site.
  5. Test the trigger. Zapier fetches your most recent verified submission as a sample.
  6. Add your next step, map the submission fields and publish the Zap.

When you turn the Zap on, Zapier adds a Webhook notification to the selected site and form in Staatic, and removes it when you turn the Zap off. Leave that notification in place while the Zap is in use.

Staatic identifies a form by its name within a site, so the same form placed on several pages is one form in Zapier. Give forms that really differ their own name.

If you delete a site or form, testing the trigger fails with an error such as Unable to pull form submissions. Select the current Site (and Form) under Configure and test again, or turn the old Zap off.

Using webhooks

Use a Webhook notification to send verified submissions to another automation service or to your own endpoint. Add one as described in Setting up notifications, choose the relevant form or Any form, and enter the URL. The URL must be a public HTTPS address.

Each verified submission is posted as JSON. It contains the submission id, the recognized name, email, company and body, every submitted field under data, the http_referrer, timestamps, and the form and site IDs and names.

Webhook notifications send submission data after the submission has been verified. Your receiving endpoint, or your Zap, should handle repeated or failed delivery attempts safely so downstream records are not duplicated, for example by skipping a submission id it has already processed.

Limitations and caveats

Forms Integration is designed for static-friendly forms. Keep these boundaries in mind:

  • Forms must render as HTML forms during publication. Staatic transforms non-empty text/html results.
  • Forms without a name attribute are skipped by the manual transformer.
  • data-staatic-redirect-url must contain a valid redirect URL. Invalid redirect URLs prevent that form from being processed.
  • Manual honeypot configuration does not create the input field. Add the field yourself and keep it empty for real users.
  • The public form endpoint is intentionally reachable by visitors. Use honeypot and reCAPTCHA where appropriate, and review spam submissions periodically.
  • Submitted file variables are available as attachments and links, but file values are not inserted into email template variables.
  • Form submission retention is handled by Staatic according to the account retention policy.