From 44fcfef61faae3f8e3525643eb3af3356f33c7d0 Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Wed, 2 May 2018 14:02:40 +1000 Subject: [PATCH] test --- booking.variety_form.inc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/booking.variety_form.inc b/booking.variety_form.inc index 918736c..6fb646d 100644 --- a/booking.variety_form.inc +++ b/booking.variety_form.inc @@ -131,8 +131,10 @@ function booking_variety_session_callback($form, &$form_state) { $options = _booking_get_variety_timeslot_options($timeslot->tid); watchdog('booking_debug', 'Timeslot @tid form state value:
@info
', array('@tid' => $timeslot->tid, '@info' => print_r($form_state['values'], true))); - watchdog('booking_debug', 'Setting default value to @value', array('@value' => - isset($form_state['values'][$fieldname]) ? $form_state['values'][$fieldname] : 0)); + watchdog('booking_debug', 'Setting timeslot @tid default value to @value', array( + '@tid' => $timeslot->tid, + '@value' => isset($form_state['values'][$fieldname]) ? $form_state['values'][$fieldname] : 0) + ); //re-create the form element for this timeslot $form['variety-sessions'][$fieldname] = array( @@ -142,7 +144,7 @@ function booking_variety_session_callback($form, &$form_state) { '#options' => $options, '#prefix' => '
', '#suffix' => '
', - '#default_value' => isset($form_state['values'][$fieldname]) ? $form_state['values'][$fieldname] : 0, + '#default_value' => 1, ); // Tell drupal to update the wrapper for this field