Go Back to Parent Doc

Reusing Forms

Most form plugins solve reuse with a shortcode: build the form once in a separate screen, then paste [form id="7"] wherever you need it. Forming Forms doesn’t have a shortcode, because WordPress already has a better answer — synced patterns.

Synced patterns

A synced pattern is a block (or group of blocks) saved once and inserted anywhere, with every copy staying in sync.

To create one:

  1. Select your finished Form block.
  2. Open the toolbar’s options menu (⋮) and choose Create pattern (called Create Reusable block on older WordPress versions).
  3. Give it a name — “Contact form” — and make sure Synced is enabled.

To use it: insert the pattern from the inserter’s Patterns tab, or type / followed by its name.

Edit the pattern once and every page carrying it updates — the shortcode workflow, without the shortcode.

Unsynced patterns are the other option: each insertion becomes an independent copy you can then customize. Use them for a starting point you expect to tweak per page, not for a form you want to maintain in one place.

Templates, template parts and widgets

The Form block isn’t limited to post content. In a block theme you can place it in:

  • A template part — a footer contact form on every page.
  • A template — a form that appears on every post of a type.
  • A widget area, through the block-based widget editor.

Each form carries a signed reference to the content it lives in (the pattern, template or template part), so it works on any page it renders on. Forming → Forms lists these forms too, with links to edit them.

Several forms on one page

Each Form block carries its own id and its own settings, so a page can hold a newsletter signup in the sidebar and a full contact form in the content, each mailing a different address. Field names only need to be unique within a single form.

A note on copying forms between sites

Copy a Form block (Ctrl/Cmd+C on the selected block) and paste it into another site’s editor and everything transfers — fields, settings and all. The form ID comes along with it, which is harmless across sites. Within one site, duplicate the block in the editor rather than pasting it, so the copy gets a new ID and its entries stay separate. Forming → Forms flags forms that share an ID. You can also move your global settings with Forming → Tools → Import / Export.

Shopping Cart
  • Your cart is empty.