try unsetting input data
This commit is contained in:
@@ -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
|
//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;
|
||||||
|
|
||||||
|
// 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: <pre>@info</pre>',
|
||||||
|
array('@name' => $fieldname, '@info' => print_r($form_state['input'], true)));
|
||||||
|
unset($form_state['input']['variety-sessions'][$fieldname]);
|
||||||
|
}
|
||||||
|
|
||||||
//create the form element for this timeslot
|
//create the form element for this timeslot
|
||||||
$form['variety-sessions'][$fieldname] = array(
|
$form['variety-sessions'][$fieldname] = array(
|
||||||
'#type' => 'select',
|
'#type' => 'select',
|
||||||
|
Reference in New Issue
Block a user