This commit is contained in:
Nathan Coad
2018-05-02 13:48:52 +10:00
parent 0874913fb8
commit 5beb81a47f

View File

@@ -128,8 +128,8 @@ function booking_variety_session_callback($form, &$form_state) {
//for each entry in the variety timeslot table, create a new form select item //for each entry in the variety timeslot table, create a new form select item
foreach($result as $timeslot) { foreach($result as $timeslot) {
$fieldname = 'select-variety-' . $timeslot->tid; $fieldname = 'select-variety-' . $timeslot->tid;
watchdog('booking_debug', 'Timeslot @tid form state value:<br /><pre>@info</pre>', watchdog('booking_debug', 'Timeslot @tid form state value: <pre>@info</pre>',
array('@tid' => $timeslot->tid, '@info' => print_r($form_state['values'][$fieldname], true))); array('@tid' => $timeslot->tid, '@info' => print_r($form_state['values'], true)));
//re-create the form element for this timeslot //re-create the form element for this timeslot
$form['variety-sessions'][$fieldname] = array( $form['variety-sessions'][$fieldname] = array(
@@ -139,7 +139,7 @@ function booking_variety_session_callback($form, &$form_state) {
'#options' => _booking_get_variety_timeslot_options($timeslot->tid), '#options' => _booking_get_variety_timeslot_options($timeslot->tid),
'#prefix' => '<div id="booking_variety_session_' . $timeslot->tid . 'wrapper">', '#prefix' => '<div id="booking_variety_session_' . $timeslot->tid . 'wrapper">',
'#suffix' => '</div>', '#suffix' => '</div>',
'#default_value' => isset($form_state['values'][$fieldname]) ? $form_state['values'][$fieldname] : '--', '#default_value' => isset($form_state['values'][$fieldname]) ? $form_state['values'][$fieldname] : '',
); );
// Tell drupal to update the wrapper for this field // Tell drupal to update the wrapper for this field