Primitive container for one step in a multi-page form. Ancestor must be prc-block/form.
Namespace
prc-block/form-page
Category
forms
Block inserter example
block.json defines an example with a core/paragraph (“Form page content.”). Ancestor is prc-block/form.
Supports
| Feature | Enabled | Details |
|---|---|---|
| Anchor | Yes | |
| HTML editing | No | |
| Reusable | No | |
| Interactivity | Yes | |
| Color | Yes | Background, text, link |
| Layout | Yes | Flex, vertical orientation; sizing on children |
| Spacing | Yes | blockGap, padding, margin |
| Typography | Yes | Font size, line height, family, weight |
Attributes
No custom attributes. Acts as a page container for fields.
Inner blocks
Yes. Place form inputs, headings, paragraphs, and other form elements for one step.
Parent / ancestor
Ancestor: prc-block/form
Usage
- Inside a Form block, add one or more Form Page blocks.
- Put fields for each step inside the matching page.
- The parent form store shows only the active page (
state.isPageHidden/hidden). - Navigation is managed by the parent form interactivity store.
Block markup example
<div
class="wp-block-prc-block-form-page"
id="prc-block-form-page-1"
data-wp-interactive="prc-block/form"
data-wp-bind--hidden="state.isPageHidden"
data-wp-context='{"pageId":"prc-block-form-page-1"}'
>
<!-- Form fields for this page -->
</div>
PHP rendering
Server-side via render_block_callback in Form_Page:
- Assigns a unique page
id(e.g.prc-block-form-page-1). - Binds
data-wp-interactive="prc-block/form". - Adds
data-wp-bind--hidden="state.isPageHidden". - Sets
data-wp-contextwith the page ID.
Frontend interactivity
No standalone view.js. Visibility comes from the parent prc-block/form store. [hidden] uses display: none in block CSS.