old codestar checkbox field code example

Example 1: old codestar checkbox field

array(
  'id'         => 'unique_option_303',
  'type'       => 'checkbox',
  'title'      => 'Checkbox Field',
  'options'    => array(
    'bmw'      => 'BMW',
    'mercedes' => 'Mercedes',
    'audi'     => 'Audi',
  ),
),

Example 2: old codestar checkbox field

array(
  'id'      => 'unique_option_302',
  'type'    => 'checkbox',
  'title'   => 'Checkbox Field',
  'label'   => 'Yes, Please do it.',
  'default' => true
),

Example 3: old codestar checkbox field

array(
  'id'    => 'unique_option_301',
  'type'  => 'checkbox',
  'title' => 'Checkbox Field',
  'label' => 'Yes, Please do it.'
),

Example 4: old codestar checkbox field

array(
  'id'       => 'unique_option_304',
  'type'     => 'checkbox',
  'title'    => 'Checkbox Field',
  'options'  => array(
    'green'  => 'Green',
    'blue'   => 'Blue',
    'yellow' => 'Yellow',
    'red'    => 'Red',
    'black'  => 'Black',
    'white'  => 'White',
  ),
  'default'  => array( 'blue', 'red' )
),

Tags:

Php Example