From cf86228bfdd68b68e880d669a3d2514db46e91b4 Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Thu, 26 May 2016 09:42:21 +1000 Subject: [PATCH] rearrange caching --- booking.emails.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/booking.emails.inc b/booking.emails.inc index cff2e4e..1e378c9 100644 --- a/booking.emails.inc +++ b/booking.emails.inc @@ -167,13 +167,15 @@ function _booking_manual_email_form_selecttype_dropdown_callback($form, &$form_s // update cached options for tableselect $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))); - $cached_form['table']['#default_value'] = $new_default_values; + // configure new tableselect based on old table select $form['new']['table'] = $cached_form['table']; + watchdog('booking_debug', "
Manual email new form table\n@info
", array('@info' => print_r( $form['new']['table'], true))); //set new default values + //$cached_form['table']['#default_value'] = $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))); + form_set_cache($form['#build_id'], $cached_form, $form_state);