Hi. I have an admin settings form that contains an array of select fields. The problem is that when submitted, the values don't end up in the db and are the select fields go back to having no selected value. The form was working fine as checkboxes, but when the need arose for each label value to have multiple values to choose from (instead of on/off) and I made it an array of fields, as below, it stopped working.

$results_tabs = array('' => 'None','a','b','c','d');

$form['myform']['form_text'] = array(
    '#value' => t('Select a setting for each type'),
);
$form['myform']['myform_types'] = array('#tree' => 1);
  foreach(myform_list_content_types() as $i => $type) {
    $form['myform']['myform_types'][$type] = array(
      '#type' => 'select',
      '#title' => t($type),
      '#options' => $results_tabs,
      '#default_value' => $edit['myform']['myform_types'][$i]
    );
  }
  return system_settings_form($form);


Jeff

Reply via email to