I have a set of modules for survey data entry and lab data upload (+parsing) that work fine in Drupal 5.x, with the exception of a very specific issue (I cannot replace form elements during hook_validate and still be able to have the replaced elements render properly). The bug I just described motivated me to migrate to Drupal 6.x, with its form_state['rebuild'] trigger, which seemed just the ticket.
Unfortunately, the survey form is huge and unwieldy, unless themed into a more compact layout. I wrote a hook (theme_cortisol_form) to handle the output of the node creation form (cortisol_form), updated the parameters to everything, fixed all glitches noted by the Coder module, and still I cannot get the theme handler to be fed the form itself. In Drupal 5.x, this was as simple as
...
$form['#theme'] = 'survey_form';
return($form);
And the appropriate magic ensued in theme_survey_form. Alas, even after registering it using
function cortisol_theme() {
$themes = array(
'survey_form' => array(
'arguments' => array('form'),
'function' => 'theme_survey_form',
),
);
return( $themes );
}
It still never gets a copy of the form. By default (I modified some of the core includes in 6.0 to look at this), it just gets theme_node_form (or some variant of same), never the actual theme I specify.