change cache code

This commit is contained in:
2016-05-26 09:39:23 +10:00
parent 25ceaa7e62
commit 64509f414f

View File

@@ -168,15 +168,15 @@ function _booking_manual_email_form_selecttype_dropdown_callback($form, &$form_s
$cached_form = form_get_cache($form['#build_id'], $form_state); $cached_form = form_get_cache($form['#build_id'], $form_state);
watchdog('booking_debug', "<pre>Manual email cached form\n@info</pre>", array('@info' => print_r( $cached_form, true))); watchdog('booking_debug', "<pre>Manual email cached form\n@info</pre>", array('@info' => print_r( $cached_form, true)));
$cached_form['table']['#default_value'] = $new_default_values; $cached_form['table']['#default_value'] = $new_default_values;
form_set_cache($form['#build_id'], $cached_form, $form_state);
// configure new tableselect based on old table select
$form['new']['table'] = $cached_form['table'];
// configure new tableselect based on old table select
$form['new']['table'] = $cached_form['table'];
//set new default values //set new default values
$form['new']['table']['#default_value'] = $new_default_values; $form['new']['table']['#default_value'] = $new_default_values;
watchdog('booking_debug', "<pre>Manual email new form table\n@info</pre>", array('@info' => print_r( $form['new']['table'], true))); watchdog('booking_debug', "<pre>Manual email new form table\n@info</pre>", array('@info' => print_r( $form['new']['table'], true)));
form_set_cache($form['#build_id'], $cached_form, $form_state);
/* /*
foreach (element_children($form['items']) as $key) { foreach (element_children($form['items']) as $key) {
if (is_numeric($key)) { if (is_numeric($key)) {