[development] Wizards, multi-part forms, and you
nick at communicontent.com
Thu Jul 20 19:55:47 UTC 2006
* and then Jeff Eaton declared....
> Time for some shameless patch pimping for Drupal 4.8/5.0.
> FormAPI has made lots of things much much easier, but has also made
> other things harder. Namely, dynamic forms that are built based on user
> input, or that submit to themselves and add additional fields. (building
> them is easy, but validation, submission, etc gets incredibly
> <http://drupal.org/node/74660> http://drupal.org/node/74660 aims to
> simplify that process for modules that need very complex multi-step
> forms. It breaks up the currently-monolithic drupal_get_form() function
> into bite sized ones like drupal_build_form(), drupal_render_form(), and
> so on. drupal_get_form() continues to work as it always has, but modules
> in need of complicated multi-step and multi-form processes can sidestep
> it completely, using the more granular functions.
> This has always been possible, but it required copy-and-paste re-use of
> almost a hundred lines of code from drupal_get_form. With this patch,
> it's easy for those who need it and transparent to those who don't.
I've not reviewed it, but it sounds like a great idea. I recently
upgraded a 4.6 extension to 4.7 which had a beastly form such as you
describe in it, the patch, assuming it does what you say, would have
made it a damn sight simpler.
More information about the development