diff --git a/booking.emails_admin.inc b/booking.emails_admin.inc index 31a0360..cc474f0 100644 --- a/booking.emails_admin.inc +++ b/booking.emails_admin.inc @@ -375,11 +375,12 @@ function booking_manual_email_form($form, &$form_state) '#title' => t('Preselect Attendees'), '#options' => $preselection_options, '#default_value' => '---', - '#ajax' => array( - 'event' => 'change', - 'callback' => '_booking_email_get_default_selection_callback', + '#suffix' => '
', + '#ajax' => array( + 'event' => 'change', + 'callback' => '_booking_email_get_default_selection_callback', 'wrapper' => 'booking_email_default_ids_wrapper', - ), + ), ); $form['submit'] = array ( @@ -529,6 +530,8 @@ function _booking_email_get_default_selection_callback($form, $form_state) { ); $output_html = render($replacementform_data['booking-email-default-ids']); + $feedback_html = t("Manual Email ajax html\n@info", array('@info' => print_r( $output_html, true))); //return a sequence of commands to run @@ -536,6 +539,7 @@ function _booking_email_get_default_selection_callback($form, $form_state) { '#type' => 'ajax', '#commands' => array( ajax_command_replace("#booking_email_default_ids_wrapper", $output_html), + ajax_command_replace("#booking_email_preselection_suffix_wrapper", $feedback_html), // This will call the command bookingEmailIDs in our custom JS file. array('command' => 'bookingAjaxCheckboxes', 'formDataElement' => 'booking_email_default_ids', //name of the hidden form element that contains the json data