WordPress Plugin

Embed StaticForm forms in WordPress using the Gutenberg block, Elementor widget, or shortcode.

View .md
On this page

The StaticForm WordPress plugin lets you embed StaticForm forms directly into your WordPress site. No HTML editing required. Connect the plugin with an API key and embed forms using the Gutenberg block, the Elementor widget, or a shortcode.

Requirements

  • WordPress 5.8 or later
  • PHP 7.4 or later
  • An active StaticForm account

Installation

  1. In your WordPress admin, go to Plugins › Add New.
  2. Search for “StaticForm App”, or go directly to wordpress.org/plugins/staticform-app.
  3. Click Install Now, then Activate.

Connecting Your API Key

After activation, go to StaticForm › Settings in the WordPress admin sidebar.

The settings page shows a direct link to create an API key with the WordPress template pre-selected. Click it to open the StaticForm dashboard with the correct permissions already chosen, copy the generated key, and paste it back into the API Key field.

The template grants User.Account.Get, User.Forms.ListMy, User.Forms.GetById, User.Forms.Submit and User.Submissions.GetCounts. The last one powers the unread badge in the WordPress menu and the StaticForm › Submissions page: it returns only the number of new, total and spam submissions per form, never what visitors submitted. A key without it still embeds forms; the Submissions page then says the counts could not be loaded. Add the permission to the key in the StaticForm dashboard (Settings, API keys) or create a new key with the template.

Counts refresh in the background and are cached for five minutes. On first connection or after embed changes, the Submissions page may ask you to reload while the site index is rebuilt. WordPress scheduled tasks (WP-Cron) must be running for these counters to refresh.

Click Save. The plugin verifies the key and shows a “Connected” status.

Restricting access to specific forms (recommended): when creating the key, use the Form access field to select only the forms your WordPress site needs. A key scoped to specific forms cannot read or submit any other form in your account, even if someone obtains the key. Leave the field empty only if you need the plugin to access all your forms.

StaticForm Settings page showing Connected status

Gutenberg Block

The StaticForm block is available in the WordPress block editor.

  1. Open any post or page in the block editor.
  2. Click the + icon to open the block inserter and search for “StaticForm”.
  3. Insert the block.
  4. Select a form from the dropdown in the block inspector. Click Sync form to pull the latest fields from StaticForm.

The block inspector exposes the following options:

Styling

  • Button colour and button text colour
  • Input border radius and button border radius (set independently)
  • Space between fields
  • Button width and alignment
  • Custom CSS (injected for this embed only)

Form settings

  • Submit button text
  • Button loading text (shown while submitting)

After submission

  • Replace form with message
  • Show banner above form
  • Animate submit button (turns green on success)
  • Success message text and auto-hide duration

Captcha

  • Site key for the captcha provider configured on the form in StaticForm
StaticForm block in the Gutenberg editor with styling inspector open

Elementor Widget

The StaticForm widget is available in the Elementor widget panel under the General category.

  1. Open a page in Elementor.
  2. In the left panel, search for “StaticForm” or find it under General.
  3. Drag the widget onto the canvas.
  4. Configure it in the left panel.

The widget panel is organized into sections:

Form: select the form from the dropdown. Use the Sync form button to refresh field data from StaticForm after making changes in the dashboard. Published pages pick up dashboard changes within five minutes, or right away after a sync.

Fields: after syncing, each field appears here with controls for label, placeholder, help text, and required toggle. Select and file fields have additional type-specific controls (options list, accepted file types, etc.).

Form settings: submit button text and button loading text.

Captcha: enter the site key for the captcha provider. The provider itself is configured in StaticForm.

After submission: choose between replacing the form with a message, showing a banner above the form, or animating the submit button. Configure the message text and auto-hide duration.

Style tab: Colors: button colour and button text colour.

Style tab: Layout: input border radius, button border radius, and space between fields.

Style tab: Submit button: button width and alignment.

Advanced tab: Custom CSS: a CSS code editor with a reference table of available selectors (.sf-form, .sf-label, .sf-input, .sf-submit, etc.).

StaticForm widget in the Elementor editor with Form settings panel open

Forms Page

Go to StaticForm › Forms in the WordPress admin to create reusable form configurations. Each configuration ties a StaticForm form to a set of styling and behavior options, and gives you a shortcode you can paste anywhere.

Configurations are shared by the whole site, so the Forms page is available to Editors and Administrators (users who can edit other people’s posts).

Options available per configuration:

  • Accent color and button text color
  • Input and button border radius
  • Space between fields
  • Button width, alignment, and loading text
  • Submit button label
  • After-submission behavior (replace with message, banner, or animate button)
  • Captcha site key
  • Field label, placeholder, and help text overrides

Once saved, a shortcode is generated for that configuration. The same form can have multiple configurations with different settings for different pages. You can also embed the same configuration twice on one page; each embed submits and shows its own errors and success message independently.

Shortcode

The shortcode works in any post, page, text widget, or theme template that supports shortcodes.

[staticform-app id="your-config-id"]

The id comes from the shortcode shown on the StaticForm › Forms page after saving a configuration. The shortcode only accepts id. All other options are set in the form configuration.

Use the shortcode when embedding forms in sidebars, theme templates, WooCommerce pages, or anywhere outside a page builder.

Captcha

The CAPTCHA provider, and for reCAPTCHA the key type, come from the form’s CAPTCHA settings in StaticForm. In WordPress you only enter the public site key (for reCAPTCHA Enterprise, the key ID) in the Captcha section of the block, the Elementor widget or the Forms page configuration. The plugin then renders what that key needs:

CAPTCHA set on the form What the plugin renders
reCAPTCHA v2, hCaptcha, Cloudflare Turnstile The provider’s widget inside the form
reCAPTCHA v3 No widget: an invisible check runs when the visitor submits
reCAPTCHA Enterprise with a checkbox key The Enterprise checkbox widget inside the form
reCAPTCHA Enterprise with a score-based key No widget: an invisible check runs when the visitor submits

The block and the Forms page show the key type next to the provider. When you switch to another key, change the key type in StaticForm and enter the new site key in WordPress. Published blocks and widgets pick up the new key type within five minutes, or right away after Sync form; a Forms page configuration picks it up when you open it and save. See Spam protection for the key types and the minimum score.

Sensitive fields

Mark sensitive fields in the StaticForm dashboard, then sync your WordPress form. All three editors retain this metadata and show yellow warnings with hover explanations. The link to manage protection opens a new tab, keeping your editor changes intact. WordPress field overrides do not change encryption or permission to share originals through email, webhooks or integrations.

The API encrypts sensitive submissions from existing embeds automatically and masks ordinary reads and public responses. Your WordPress API key does not need permission to reveal original values.