From ef66bf484200cb56c6417a96fbede48c17cdf5cd Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Wed, 2 May 2018 14:20:10 +1000 Subject: [PATCH] try not recreating form element --- booking.variety_form.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/booking.variety_form.inc b/booking.variety_form.inc index a41c0eb..469fac4 100644 --- a/booking.variety_form.inc +++ b/booking.variety_form.inc @@ -58,7 +58,7 @@ function booking_variety_regn_form($node, &$form_state) '#type' => 'select', '#title' => t('Variety Session: ' . $timeslot->booking_variety_time_descrip), '#required' => TRUE, - '#default_value' => isset($form_state['values'][$fieldname]) ? $form_state['values'][$fieldname] : 0, + '#default_value' => isset($form_state['values'][$fieldname]) ? $form_state['values'][$fieldname] : 'Paintball', '#options' => _booking_get_variety_timeslot_options($timeslot->tid), '#prefix' => '
', '#suffix' => '
', @@ -138,7 +138,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), @@ -148,7 +148,7 @@ 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