Closed (fixed)
Project:
Chaos Tool Suite (ctools)
Version:
7.x-1.0-alpha2
Component:
Documentation
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
27 Jan 2011 at 11:48 UTC
Updated:
24 Mar 2011 at 20:11 UTC
Just spent an hour wondering why my D7 multi-step form doesn't produce any output at all, when the equivalent D6 multi-step form worked just fine.
The form builders must "return $form;" instead of having the form passed by reference:
<?php
function mymodule_step_form($form, &$form_state) {
// add my fields
return $form;
}
Hope that saves others some time.
Comments
Comment #1
eclipsegc commentedIn the switch to drupal 7's core form.inc (which is largely inspired from ctools d6 form.inc core made a move to return forms instead of passing them by reference. This will turn out to be an issue in many places within ctools including many plugin forms and wizards.
Comment #2
merlinofchaos commentedThis is already noted in the UPGRADE.txt :)
Comment #3
adaddinsaneRead documentation? What a crazy idea. :-)