Custom Drupal 6 Multistep Form Wizard
I'm starting on my second major version of a custom D6 multistep form-based module with a few interesting requirements, particularly:
- The "form" is three steps--but the last step is not a form, it is a simple confirmation page or a redirect to any admin configurable page with a confirmation message.
- With enough information, Step 1 can be skipped
- A node will be created upon successful submission of Step 1, and the same node will be updated upon successfully submission of Step 2.
I call it a form, but it's really a wizard with two forms and one confirmation page. So I'll call it a wizard.
Step 1 form has only a few simple fields (two of which are dependent upon another, BTW). When the field values/selections are known, they should be passed to a special URL which handles submitting the Step 1 form behind the scenes, and, after passing validation, land the user on the Step 2 form (or back on Step 1 if validation doesn't pass).
- Drupal 6
- ctools object cache
- form building function(s)
- custom 'wizard' (not ctools', because it's not AHAH-friendly)
- as much OOP as possible (because it's just so clean).