Home
Open Source Works

Drupal 5 Wizard API Module

Attached is a Wizard module for Drupal 5.1. It provides developers with an easy API to make wizards in their applications with a minimum of hassle.

Features include:

  • Provides configurable "Back", "Next", "Finish" and "Cancel" buttons on all form pages
  • Button labels are configurable, they can be enabled/disabled and made invisible
  • Moving forwards and backwards in the wizard is completely automatic
  • Developers only need to configure the wizard and provide validate/submit handlers
  • Validate and Submit phases are greatly simplified - developers only need handle their own form elements as all wizard functionality is already handled by the module
  • A generic data storage facility is provided for developers to store form data between pages

Note: Drupal 5.1 has some serious limitations related to validation of multistep forms (bug report). This limitation makes Wizards of limited use (especially with text fields). Also, checkboxes are problematic in Drupal 5.1 (bug report), but workarounds are provided by the wizard module.

An example module (gandalf) is provided to demonstrate the wizard functionality (as wizard.module does nothing on it's own!).

AttachmentSize
gandalf-5.x-1.0.tar.gz3.41 KB
wizard-5.x-1.2.tar.gz7.52 KB

Can't initialise module

Hi, when I try to enable the module I get the following error in a white screen of death:

Parse error: parse error, unexpected '=', expecting ')' in ...snip...\sites\all\modules\wizard\wizard.module on line 219

...and a dead Drupal site, it's just stuck on that error page. I can hack the database and set the wizard module status back to 0 - but it's a bit messy, you know ;-)

This looks an interesting module - I would like to try it out if you can advise how to fix it?

Cheers
JB

Thanks - fixed in version 1.2

This problem was caused by a function declaration that is illegal in PHP4 (but fine in PHP5). The net result of this is that there's a minor API change, but we should be fine on PHP4 from Wizard version 1.2 onwards.

As view data entered into the form ?

Hello, first I want agracer for the effort they are making to other users in the form we use drupal more friendly.
I am new to this application, I learned to visualize the contents of a form view and cck, but not what was viewed as the data entered into the form proposed here example gandalf
Did you could tell me as view data entered by the form or may indincarme a link where you can learn how to visualize the data Stored in the table created for the form gandalf?
From Thanks, excuse my English google

Re: As view data enterered into the form ?

The Wizard module isn't CCK compatible, so the tools that CCK uses aren't available here. The only way to get at the data from the Wizard forms is through PHP programming (as outlined in the example, Gandalf). I'm sorry this this probably isn't what you were hoping for! :-(