You are here

function node_field_checkbox_widget in Node Field 7.2

Widget for checkbox field.

1 string reference to 'node_field_checkbox_widget'
node_field_types_info in includes/node_field.field.inc
Node field types info.

File

includes/node_field.field.inc, line 272
Field types, settings, widget and formatters.

Code

function node_field_checkbox_widget($node_field) {
  $form = [
    '#type' => 'checkbox',
    '#title' => $node_field['title'],
    '#default_value' => $node_field['value'],
  ];
  return $form;
}