From 5cf0962d1f07efd5693c166fb4f0fb8c91c95dd3 Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Wed, 2 May 2018 14:13:57 +1000 Subject: [PATCH] test --- booking.variety_form.inc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/booking.variety_form.inc b/booking.variety_form.inc index 7351a22..87d4c0e 100644 --- a/booking.variety_form.inc +++ b/booking.variety_form.inc @@ -57,7 +57,7 @@ function booking_variety_regn_form($node, &$form_state) '#type' => 'select', '#title' => t('Variety Session: ' . $timeslot->booking_variety_time_descrip), '#required' => TRUE, - '#default_value' => '', + '#default_value' => '--', '#options' => _booking_get_variety_timeslot_options($timeslot->tid), '#prefix' => '
', '#suffix' => '
', @@ -137,7 +137,7 @@ function booking_variety_session_callback($form, &$form_state) { ); //re-create the form element for this timeslot - /* + $form['variety-sessions'][$fieldname] = array( '#type' => 'select', '#title' => t('Variety Session: ' . $timeslot->booking_variety_time_descrip), @@ -145,16 +145,16 @@ function booking_variety_session_callback($form, &$form_state) { '#options' => $options, '#prefix' => '
', '#suffix' => '
', - '#default_value' => 1, + '#default_value' => 'Paintball', ); - */ - $form['variety-sessions'][$fieldname]['#options'] = $options; + + //$form['variety-sessions'][$fieldname]['#options'] = $options; // Tell drupal to update the wrapper for this field $commands[] = ajax_command_replace('#booking_variety_session_' . $timeslot->tid . 'wrapper', render($form['variety-sessions'][$fieldname])); } - //$form_state['rebuild'] = TRUE; + $form_state['rebuild'] = TRUE; return array('#type' => 'ajax', '#commands' => $commands); }