PUBLIC DOCUMENTATION

Fields, content types and visual FSE editing with DMBB.

← All Help Topics
HOW TO USE · VERSION 9.5.0

Checkbox (Pro)

A simple yes/no control.

Screenshots and walkthrough — expand to view

Screenshots use sample data and English labels. Follow the translated instructions on this page; your theme, language, permissions and license can change the available controls. Select an image to view it at full size.

Checkbox field: builder settings, storage key and validation options.
Checkbox field: builder settings, storage key and validation options.
Checkbox field: sample controls in the content editor.
Checkbox field: sample controls in the content editor.
What it does Stores enabled or disabled state.
Use it when Featured flags, visibility toggles, switches and boolean settings.
How to configure Select Checkbox. The description becomes the checkbox label when provided.
Saved as 1 for checked and 0 for unchecked.
EXAMPLE

Featured

1
Read a Checkbox Field in PHP

Use the field Key from the builder as the second argument of get_post_meta(). Escape or sanitize the value for its final output context.

$checked = get_post_meta( get_the_ID(), 'your_meta_key', true );

if ( '1' === (string) $checked ) {
    echo esc_html( 'Enabled' );
} else {
    echo esc_html( 'Disabled' );
}
The checkbox is stored as a scalar value. The builder normally saves the checked state as 1 and the unchecked state as 0/empty depending on the submitted value. Security: Escape the value for its output context; do not print unescaped post meta directly into HTML.

Documentation for Dynamic Meta Box Builder 9.5.0.