I'm trying to get my checkboxes to display in multiple columns in Drupal 7 within my own module and followed the instructions. I now have this code in my form definition:

  $form['alert_form'][$alertid]['locations'] = array
      (
      '#type' => 'checkboxes',
      '#options' => $selectArr,
      '#default_value' => $locationsChecked,
      '#multicolumn' => array('width' => 3),
  );

However, apart from a single list of checkboxes (with lots of entries), nothing happens (so no multiple columns). The module is enabled and I looked at the example listed, but the source code is not supplied so it doesn't help me much. Am I missing something?

Comments

Whiskey’s picture

Status: Active » Closed (fixed)

Never mind, turned out I had enabled multi-select for CCK only. There is another entry "Multi-column checkboxes radios" under User Interface. That was the one I needed to enable.