How to see #default_values in multiselect form I've done a custom form that is a multiselect type form. When I edit the node, the options that were previously selected are not shown in the selected options part.

This is the code that I've done:

 foreach ($node-&gt;field_tem_tica[LANGUAGE_NONE] as $delta =&gt; $value) {
    $term2 = taxonomy_term_load($value['tid']);
 }

  $query2 = "SELECT name, tid FROM taxonomy_term_data WHERE vid=4 AND language = '$language_url';";
  $result = db_query($query2);
  foreach ($result as $row2) {
     $options3[$row2-&gt;tid] = t($row2-&gt;name);
  }

  $form['group_config']['tematicas'] = array(
     '#type' =&gt; 'multiselect',
     '#title' =&gt; t('Temáticas'),
     '#options' =&gt; $options3,
     '#required' =&gt; TRUE,
     '#multiple'=&gt;TRUE,
     '#default_value'=&gt; $term2,
     '#prefix' =&gt; '&lt;p&gt;&lt;br&gt;',
     '#suffix' =&gt; '&lt;/p&gt;',
     '#size'=&gt;20,
  );


Does anybody see a mistake? Is there any way to see the default_values?

Thank you.
The default value needs to be the key of the options array, so assuming the rest of your code is correct, this should work:

$form['group_config']['tematicas'] = array(
  '#type' =&gt; 'multiselect',
  '#title' =&gt; t('Temáticas'),
  '#options' =&gt; $options3,
  '#required' =&gt; TRUE,
  '#multiple'=&gt;TRUE,
  '#default_value'=&gt; $term2-&gt;tid,
  '#prefix' =&gt; '&lt;p&gt;&lt;br&gt;',
  '#suffix' =&gt; '&lt;/p&gt;',
  '#size'=&gt;20,
);