diff --git a/booking.variety_form.inc b/booking.variety_form.inc index 5c01734..9564c15 100644 --- a/booking.variety_form.inc +++ b/booking.variety_form.inc @@ -53,6 +53,14 @@ function booking_variety_regn_form($node, &$form_state) //for each entry in the variety timeslot table, create a new form select item foreach($result as $timeslot) { $fieldname = 'select-variety-' . $timeslot->tid; + + // Make sure we get rid of any stale data + if (isset($form_state['input']['variety-sessions'][$fieldname])) { + watchdog('booking_debug', 'Unsetting stale @name data, was:
@info', + array('@name' => $fieldname, '@info' => print_r($form_state['input'], true))); + unset($form_state['input']['variety-sessions'][$fieldname]); + } + //create the form element for this timeslot $form['variety-sessions'][$fieldname] = array( '#type' => 'select',