From 8b208a5fdbcf2264f98800f6ebcbc20f5aafb59e Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Thu, 26 May 2016 11:24:46 +1000 Subject: [PATCH] fix --- booking.emails.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/booking.emails.inc b/booking.emails.inc index 979fd4b..dc0a4e8 100644 --- a/booking.emails.inc +++ b/booking.emails.inc @@ -125,7 +125,7 @@ function booking_manual_email() '#type' => 'tableselect', '#header' => $header, '#options' => _booking_manual_email_generate_options(), - '#default_value' => $values, + //'#default_value' => $values, '#empty' => t('No attendees found.'), '#attributes' => array('id' => 'sort-table'), '#prefix' => '
', @@ -233,6 +233,8 @@ function _booking_manual_email_selecttype_dropdown_callback($form, &$form_state) //$checkboxes = $form_state['values']['table']; $select_type = $form_state['values']['select-type']; $new_default_values = array(); + + $options = _booking_manual_email_generate_options(); // generate new default values // @todo use a function for this @@ -244,7 +246,7 @@ function _booking_manual_email_selecttype_dropdown_callback($form, &$form_state) // update cached options for tableselect $cached_form = form_get_cache($form['#build_id'], $form_state); - $cached_form['table']['#options'] = _booking_manual_email_generate_options(); + $cached_form['table']['#options'] = $options; form_set_cache($form['#build_id'], $cached_form, $form_state); // remove radios from tableselect