use form state input instead

This commit is contained in:
Nathan Coad
2018-05-22 12:18:37 +10:00
parent 10dc8b6f38
commit 1501d6bd63

View File

@@ -275,15 +275,17 @@ function booking_emails_custom_ajax_form($node, &$form_state) {
// Populate some default values if a selection has already been made // Populate some default values if a selection has already been made
watchdog('booking_debug', 'booking_emails_custom_ajax_form state: <pre>@info</pre>', array('@info' => print_r( $form_state, true))); watchdog('booking_debug', 'booking_emails_custom_ajax_form state: <pre>@info</pre>', array('@info' => print_r( $form_state, true)));
if (!isset($form_state['storage']['emailtype'])) { if (!isset($form_state['input']['email-type'])) {
$subject_value = ""; $subject_value = "";
$body_value = ""; $body_value = "";
} }
else { else {
$emailtype = $form_state['storage']['emailtype']; $emailtype = $form_state['input']['email-type'];
$subject_value = variable_get('booking_email_subject_' . $emailtype, ''); $subject_value = $form_state['input']['booking_email_subjectline_custom'];
$body_value = variable_get('booking_email_' . $emailtype, ''); $body_value = $form_state['input']['booking_email_body_custom'];
$body_value = isset($body_value['format']) ? $body_value['value'] : $body_value; //$subject_value = variable_get('booking_email_subject_' . $emailtype, '');
//$body_value = variable_get('booking_email_' . $emailtype, '');
//$body_value = isset($body_value['format']) ? $body_value['value'] : $body_value;
} }
if(variable_get('booking_enable_html_mail', 0) == 1) { if(variable_get('booking_enable_html_mail', 0) == 1) {