Custom Field: checkbox

When adding custom fields you can use the checkbox type to display a field.

checkbox Field Type

This will display checkboxes that can be checked.

'name'         => 'property_field_checkbox',     // Required: Custom field key.
'label'        => 'Checkbox Field',              // Required: Checkbox Label.
'type'         => 'checkbox_single',             // Required: Field Type.
'opts'         => array(                         // Required: Array of options.
	'option-1' => 'Option 1',                
	'option-2' => 'Option 2',
	'option-3' => 'Option 3',
),

'include'      => array( 'property', 'rental' ), // Optional: Post types or exclude for all.
'class'        => 'some-class-name',             // Optional. Custom class name.
'help'         => 'Optional: Help text.',        // Optional: Help text.
'import'       => 'preserve',                    // Optional: Do not update when imported.

Custom checkbox field example:

Field selected: