checkboxes

Example of displaying multiple checkboxes, with one value selected

  1. $form['option_occassions'] = array(
  2.    '#type' => 'checkboxes',
  3.   '#title' => t('Associated Occassions'),
  4.    '#options' => array(
  5.     1 => "Formal",
  6.     2 => "Social",
  7.     3 => "Xmas",

Broken FAPI?

  1.  $node_types = node_get_types('names');
  2.   $form['tqf']['types'] = array(
  3.     '#title' => t('Nodes'),
  4.     '#type' => 'checkboxes',
  5.     '#options' => $node_types,
Syndicate content