From 11dd6a2edfb5e7c8d03dcee520291dbb04166c2d Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Wed, 2 May 2018 14:23:25 +1000 Subject: [PATCH] test --- booking.variety_form.inc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/booking.variety_form.inc b/booking.variety_form.inc index 37d22db..f736860 100644 --- a/booking.variety_form.inc +++ b/booking.variety_form.inc @@ -80,7 +80,7 @@ function booking_variety_session_callback($form, &$form_state) { $commands = array(); //$node = $form_state['values']['form_id']; $data = $form_state['input']; - //watchdog('booking_debug', 'booking_variety_session_callback:
@info
', array('@info' => print_r( $data, true))); + watchdog('booking_debug', 'booking_variety_session_callback:
@info
', array('@info' => print_r( $form, true))); // --- Update the wrapper for booking ID validity --- //verify that user-entered data is a number @@ -138,8 +138,8 @@ function booking_variety_session_callback($form, &$form_state) { ); //re-create the form element for this timeslot - /* - $form['variety-sessions'][$fieldname] = array( + + $form['form']['variety-sessions'][$fieldname] = array( '#type' => 'select', '#title' => t('Variety Session: ' . $timeslot->booking_variety_time_descrip), '#required' => TRUE, @@ -148,11 +148,11 @@ function booking_variety_session_callback($form, &$form_state) { '#suffix' => '', '#default_value' => 1, ); - */ + //$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])); + $commands[] = ajax_command_replace('#booking_variety_session_' . $timeslot->tid . 'wrapper', render($form['form']['variety-sessions'][$fieldname])); } $form_state['rebuild'] = TRUE;