change #default_value to #value
This commit is contained in:
@@ -305,12 +305,12 @@ function booking_emails_custom_ajax_form($node, &$form_state) {
|
|||||||
'#title' => t('Subject line for Custom Email'),
|
'#title' => t('Subject line for Custom Email'),
|
||||||
'#size' => 150,
|
'#size' => 150,
|
||||||
'#maxlength' => 300,
|
'#maxlength' => 300,
|
||||||
'#default_value' => isset($form_state['values']['booking_email_subjectline_custom']) ? $form_state['values']['booking_email_subjectline_custom'] : '',
|
'#value' => isset($form_state['values']['booking_email_subjectline_custom']) ? $form_state['values']['booking_email_subjectline_custom'] : '',
|
||||||
);
|
);
|
||||||
$form['email-definition']['booking_email_body_custom'] = array(
|
$form['email-definition']['booking_email_body_custom'] = array(
|
||||||
'#title' => t('Email text for custom email'),
|
'#title' => t('Email text for custom email'),
|
||||||
'#description' => t(''),
|
'#description' => t(''),
|
||||||
'#default_value' => isset($form_state['values']['booking_email_body_custom']) ? $form_state['values']['booking_email_body_custom'] : '',
|
'#value' => isset($form_state['values']['booking_email_body_custom']) ? $form_state['values']['booking_email_body_custom'] : '',
|
||||||
'#type' => $form_type,
|
'#type' => $form_type,
|
||||||
'#format' => $form_format,
|
'#format' => $form_format,
|
||||||
);
|
);
|
||||||
@@ -338,11 +338,11 @@ function booking_emails_custom_ajax_form_callback($form, &$form_state) {
|
|||||||
$emailtype = $form_state['input']['email-type'];
|
$emailtype = $form_state['input']['email-type'];
|
||||||
if (strpos($emailtype, 'custom') !== false) {
|
if (strpos($emailtype, 'custom') !== false) {
|
||||||
$subject = variable_get('booking_email_subject_' . $emailtype, '');
|
$subject = variable_get('booking_email_subject_' . $emailtype, '');
|
||||||
$form['form']['email-definition']['booking_email_subjectline_custom']['#default_value'] = $subject;
|
$form['form']['email-definition']['booking_email_subjectline_custom']['#value'] = $subject;
|
||||||
|
|
||||||
$text = variable_get('booking_email_' . $emailtype, '');
|
$text = variable_get('booking_email_' . $emailtype, '');
|
||||||
$text = isset($text['format']) ? $text['value'] : $text;
|
$text = isset($text['format']) ? $text['value'] : $text;
|
||||||
$form['form']['email-definition']['booking_email_body_custom']['#default_value'] = $text;
|
$form['form']['email-definition']['booking_email_body_custom']['#value'] = $text;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rebuild the form
|
// Rebuild the form
|
||||||
|
Reference in New Issue
Block a user