test default value
This commit is contained in:
@@ -52,12 +52,13 @@ 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;
|
||||||
//create the form element for this timeslot
|
//create the form element for this timeslot
|
||||||
$form['variety-sessions']['select-variety-' . $timeslot->tid] = array(
|
$form['variety-sessions'][$fieldname] = array(
|
||||||
'#type' => 'select',
|
'#type' => 'select',
|
||||||
'#title' => t('Variety Session: ' . $timeslot->booking_variety_time_descrip),
|
'#title' => t('Variety Session: ' . $timeslot->booking_variety_time_descrip),
|
||||||
'#required' => TRUE,
|
'#required' => TRUE,
|
||||||
'#default_value' => '--',
|
'#default_value' => isset($form_state['values'][$fieldname]) ? $form_state['values'][$fieldname] : 0,
|
||||||
'#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>',
|
||||||
|
Reference in New Issue
Block a user