add song choice

This commit is contained in:
2017-08-18 10:24:45 +10:00
parent 9294e17e3f
commit e324071ad9
3 changed files with 22 additions and 1 deletions

View File

@@ -910,7 +910,14 @@ function booking_form($node, &$form_state, $inserting = FALSE, $early_access_all
'#required' => FALSE,
'#default_value' => !empty($data->booking_random_facts) ? $data->booking_random_facts : ''
);
$form['misc-areas']['booking_song_choice'] = array(
'#type' => 'textfield',
'#title' => t("Let us know if there's a song you'd love to sing during the week."),
'#maxlength' => 200,
'#required' => FALSE,
'#default_value' => !empty($data->booking_song_choice) ? $data->booking_song_choice : ''
);
if ($inserting == TRUE) {
$form['submit'] = array(
@@ -1256,6 +1263,7 @@ function booking_form_submit($form, &$form_state)
$node->booking_skills_other = empty($values['booking_skills_other']) ? 'N' : ($values['booking_skills_other'] == 1 ? 'Y' : 'N');
$node->booking_skills_other_details = empty($values['booking_skills_other_details']) ? 'N/A' : $values['booking_skills_other_details'];
$node->booking_earlyaccess_code_id = empty($values['booking_earlyaccess_code']) ? '' : $earlyaccess_query->cid;
$node->booking_song_choice = empty($values['booking_song_choice']) ? '' : $values['booking_song_choice'];
//remove newlines from these fields so the CSV output doesn't get messed up
$medical = empty($values['booking_medical_conditions']) ? 'N/A' : $values['booking_medical_conditions'];