diff --git a/booking.emails.inc b/booking.emails.inc index 7069416..74dcbd8 100644 --- a/booking.emails.inc +++ b/booking.emails.inc @@ -168,22 +168,24 @@ function _booking_manual_email_selecttype_dropdown_callback($form, &$form_state) $cached_form = form_get_cache($form['#build_id'], $form_state); watchdog('booking_debug', "
Manual email cached form\n@info
", array('@info' => print_r( $cached_form, true))); + //unset old tableselect + unsset($form['table']); // configure new tableselect based on old table select - $form['new']['table'] = $cached_form['form']['table']; + $form['table'] = $cached_form['form']['table']; //set new default values //$form['new']['table']['#default_value'] = $new_default_values; - watchdog('booking_debug', "
Manual email new form table\n@info
", array('@info' => print_r( $form['new']['table'], true))); - watchdog('booking_debug', "
Manual email new default values\n@info
", array('@info' => print_r( $form['new']['table']['#default_value'], true))); - watchdog('booking_debug', "
Manual email new form array\n@info
", array('@info' => print_r( $form['new'], true))); + watchdog('booking_debug', "
Manual email new form table\n@info
", array('@info' => print_r( $form['table'], true))); + watchdog('booking_debug', "
Manual email new default values\n@info
", array('@info' => print_r( $form['table']['#default_value'], true))); + watchdog('booking_debug', "
Manual email new form array\n@info
", array('@info' => print_r( $form, true))); //$new_html = drupal_render($form['new']['table']); //watchdog('booking_debug', "
Manual email rendered table\n@info
", array('@info' => print_r( $new_html), true)); // update the tableselect $commands = array(); - $commands[] = ajax_command_replace('#manual-email-attendees-items', drupal_render($form['new']['table'])); + $commands[] = ajax_command_replace('#manual-email-attendees-items', drupal_render($form['table'])); return array('#type' => 'ajax', '#commands' => $commands); }