How do you load a select field with pre-selected items when the Chosen module is installed/enabled?
I am using the following code.
$my_list = array('item1' = 'item1', 'item2' = 'item2', 'item3' = 'item3'); $form['list_info']['my_list'] = array( '#title' => t('Select a list to manage:'), '#type' => 'select', '#options' => $my_list, '#default_value' => $my_list, );
The select field shows up empty. Clicking it reveals the items and I can select them, but I need the field to show up with the items selected.