All,
I can't seem to put my finger on this. I have a simple form with three fields. It works perfectly, until I create a theme() function for it. Here's the form code:
$form['term'] = array (
'#type' => 'textfield','#title' => 'Query String',
'#required' => TRUE,'#default_value' => $term,
'#autocomplete_path' => 'staff/autocomplete',
'#size' => 32,'#maxlength' => 128);
$form['type'] = array(
'#type' => 'select','#title' => 'Type','#default_value' => $type,
'#options' => array ('callhistory' => t('History'),'authlog' => t('Authentication')));
$form['when'] = array(
'#type' => 'select','#title' => 'When','#default_value' => $when,
'#options' => array (
'today' => t('Today'),'yesterday' => t('Yesterday'),
'week' => t('This Week'),'lastweek' => t('Last Week'),
'month' => t('This Month'),'lastmonth' => t('Last Month')));
$form['submit'] = array('#type' => 'submit','#title' => 'blah','#value' => t('Go'));
Here's the theme code:
<?php
function XXtheme_staff ($form) {
$output = '
';
$output .= form_render($form['term']);
$output .= ' |
';
$output .= form_render($form['type']);
$output .= ' |
';
$output .= form_render($form['when']);
$output .= ' |
';
$output .= form_render($form['submit']);
|