header photo

via positiva

At long last, love for the multipart forms

UPDATE: The patch has been committed. Check out my latest post for a first draft of the docs on how to use it.

About two weeks ago I posted an epic tome explaining the current state of affairs with Drupal's form workflow, and how it affected attampts to build dynamic multi-step forms.

As we learned in that thrilling chapter of Jeff-Talks-About-Geeky-Stuff, building a form dynamically is no problem -- the tricky bit is making sure that the values from step 1 are validated and submitted with the form array from step 1, rather than the array from step 2.

Well, a lot has changed in the past two weeks. Not the least of which is the major FormAPI patch that changed things from a 'push' model to a 'pull' model. That was interesting, and had the nice side benefit of making programmatically-submitted forms a reality. Now, though, we're ready for the real multistep FormAPI meat.

A new patch has just been posted that allows Drupal to keep track of the 'which values go with which form' tangle. The details are explained in that issue, but it's the culmination of quite a bit of hacking, troubleshooting, and brainstorming by Adrian, chx, and myself. I've only been along for the ride most of the time, but it's been very exciting to see it come together.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote> <img> <i> <b> <strike> <h3> <h4>
  • Lines and paragraphs break automatically.
  • You may use [inline:xx] tags to display uploaded files or images inline.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

Miniblog

  • Best summary ever: "My name is Ulrich Haarbürste and I like to write stories about Roy Orbison being wrapped in cling-film." Oh, Internets. 2 hours ago
  • @domesticat I believe you're thinking of the "NOM NOM Award for Excellence in Open Source" 3 hours ago
  • @fur I just realized you've been on Twitter a long, long time. You've got a lower user id than anyone I know save @walkah... 3 hours ago
  • All cats are dysfunctional. "If you loved me, you would let me sit on your hamburger" implies *unhealthy boundaries*. 14 hours ago
  • @essl Awww. The video's awesome. I always get kind of choked up by good design. Sigh. 14 hours ago

Posts that week...