Bricks Builder
Embed Core Forms in Bricks layouts with a native element and pull submitted values into Bricks templates with a dynamic data token.
Element name: core-forms-form Class: Core_FormsBuildersBricksFormElement Source: src/builders/class-bricks-form-element.php, src/builders/class-builder-integrations.php
The element and token register automatically when Bricks is active. No settings screen is involved.
The Core Form Element
Open a page in Bricks and search for Core Form in the elements panel (General category; it also matches “form”, “contact”, “newsletter” and “survey”). Drag it into the layout and pick a form. Fields, emails and actions are still managed under Core Forms; the element places and styles a form.
Until a form is selected, the builder canvas shows a placeholder and the live page renders nothing for that element.
Content tab: Form
| Control | Type | Description |
|---|---|---|
| Form | Select (searchable) | Any Core Forms form, by title |
| Show form title | Checkbox | Prints the form’s title at the top of the form, aligned with the fields |
| Title tag | Select | h2–h6 or p (default h3), shown when the title is on |
| Form theme | Select | Empty uses the form’s own setting; Load the form theme forces it on; Use my Bricks styles only turns it off for this placement |
The theme choice changes only this placement; the form’s saved setting is untouched.
Style tab
The Colors, Fields and Submit button controls set the form theme’s CSS variables on the rendered .cf-form, so focus rings, hover states and checkbox colors follow your choices. They need the form theme loaded. Typography controls style the elements directly and work either way.
| Group | Controls | Sets |
|---|---|---|
| Form layout | Max width, Space between fields | --cf-max-width, --cf-spacing |
| Colors | Accent (focus, checkboxes, button), Text, Help text, Form background | --cf-brand + --cf-focus, --cf-text, --cf-text-soft, --cf-bg |
| Labels | Typography | font on labels and legends |
| Fields | Background, Border color, Border width, Corner radius, Height, Typography | --cf-input-bg, --cf-border, --cf-border-width, --cf-radius, --cf-input-height, font on inputs, selects and textareas |
| Submit button | Background, Hover background, Text color, Corner radius, Width (fit text / full width), Typography | --cf-button-bg, --cf-button-hover, --cf-button-text, --cf-button-radius, --cf-button-width, font on the submit button |
| Messages | Success, Error | --cf-success, --cf-error |
Inside the element, the focus ring and button glow are derived from the accent and button colors, so a red accent gets a red glow rather than the theme’s default blue.
Bricks’ standard controls (spacing, background, border, width and so on) still apply to the element’s wrapper. The element fills its column by default, like Bricks’ own Form element.
Assets
Core Forms finds Core Form elements in the page’s Bricks content, its active templates (header, footer, content and popups) and section templates they embed, and loads exactly the styles and scripts those forms need in the page head. In the builder, the form styles load in the canvas so the preview matches the live page.
The {cf_submission:field} Dynamic Token
Core Forms registers a Core Forms submission field dynamic tag (group: Core Forms). Use it anywhere Bricks accepts dynamic data:
{cf_submission:email}
{cf_submission:name}
{cf_submission:any_field_name}
The part after the colon is the field’s name attribute (letters, numbers, hyphens, and underscores).
How the token resolves
The token renders the matching value from a submission object supplied by the cf_bricks_dynamic_submission filter:
add_filter( 'cf_bricks_dynamic_submission', function ( $submission, $post, $context ) {
return cf_get_submission( 123 ); // your logic for picking the submission
}, 10, 3 );
- If no submission is supplied, or the field is missing, the token renders an empty string.
- Array values (checkbox groups, multi-selects) render as a comma-separated list.
- The token also works inside longer text content, not just standalone fields.
This is intended for building submission detail templates, confirmation views, and similar layouts where your code decides which submission is in context.
Notes
- The element renders the same markup as the
[cf_form]shortcode and the Core Forms block, so validation, conditional fields, and actions behave identically. - Forms are listed by title in the Form dropdown; all forms are available regardless of status filters in the admin list.
- For Elementor sites, see Elementor. For general embedding options, see the Integrations Overview.
Troubleshooting
- Element missing from the panel: Bricks must be the active theme (or active on the site). The element only registers when the Bricks element classes exist.
- Placeholder instead of a form: No form is selected, or the selected form was deleted. Re-select a form in the Form controls.
- Style controls have no effect: the form theme is off for that form. Set Form theme to Load the form theme, or style the form with typography controls and your own CSS.
- Token prints nothing: No
cf_bricks_dynamic_submissionfilter is returning a submission for that context, or the field name in the token doesn’t match the form field’snameattribute.