diff --git a/booking.emails.inc b/booking.emails.inc index 543b2cd..c6e81af 100644 --- a/booking.emails.inc +++ b/booking.emails.inc @@ -252,9 +252,9 @@ function _booking_manual_email_selecttype_ajax_callback($form, &$form_state) { $new_default_values = array("1815" => TRUE); } - unset($form['table']); + //unset($form['table']); - $form['table'] = array ( + $form['new']['table'] = array ( '#type' => 'tableselect', '#header' => $header, '#options' => $options, @@ -268,7 +268,7 @@ function _booking_manual_email_selecttype_ajax_callback($form, &$form_state) { // update cached options for tableselect $cached_form = form_get_cache($form['#build_id'], $form_state); - $cached_form['table'] = $form['table']; + $cached_form['table'] = $form['new']['table']; form_set_cache($form['#build_id'], $cached_form, $form_state); /* $form['table']['#options'] = $options; @@ -276,7 +276,7 @@ function _booking_manual_email_selecttype_ajax_callback($form, &$form_state) { $form['table']['#default_value'] = $new_default_values; $form['table']['#value'] = $new_default_values; */ - return $form['table']; + return $form['new']['table']; $form['table'] = array ( '#type' => 'tableselect', @@ -293,7 +293,7 @@ function _booking_manual_email_selecttype_ajax_callback($form, &$form_state) { watchdog('booking_debug', "
Manual email new form table before\n@info
", array('@info' => print_r( $form['table'], true))); //$form['table']['#default_value'] = $new_default_values; $form['table'] = form_process_tableselect($form['table']); - $form['table']['#default_value'] = $new_default_values; + //$form['table']['#default_value'] = $new_default_values; watchdog('booking_debug', "
Manual email new form table after\n@info
", array('@info' => print_r( $form['table'], true))); return $form['table'];