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

  • We got our cats a pup tent. Don't ask why, but they LOVE it. 5 hours ago
  • @davexoxide The BIG idea is to have a module that spits out schema_api definitions, views table data, and edit forms from one desc... heh 6 hours ago
  • TODO: Make a module that reads hook_schema and spits out edit forms. 13 hours ago
  • @essl Even robots think aussie voices are sexy. It's *physics* 16 hours ago
  • @letsgomiah it's way more fun than GoodCamp! 16 hours ago