CheckboxMultiple
Multiple checkbox options, similar to WP taxonomies.
Consider using select-multiple if you need to limit the number of options.
Returns an array of selected values.
Value
Returns (string|number)[]
$value = json_decode(fx_get_meta('id'), true);
Example
'id' => [
'type' => 'checkbox-multiple',
'className' => 'my-class-name',
'label' => 'Posts',
'options' => 'post',
'showToggleAll' => true,
'taxonomyLayout' => true,
],
Props
className
Metabox class name
type: string
exclude
A list of ids to exlude from the options list
type: array
label
Tab label used when in WP taxonomy layout
type: string
options (required)
Options to choose from. See options for more information.
type: array
showToggleAll
Show a toggle all button
type: bool
defaultValue: true
taxonomyLayout
Present the meta box as a WP taxonomy
type: bool
defaultValue: true
title
Metabox title
type: string