title: Drupal 7: Ajax Powered Multi-step Forms
body: <p>In Drupal 7, I am currently working to develop a multi-step Ajax form with the following workflow:</p>
  
  <ol>
  <li>The user selects an item from a dropdown (<code>&lt;select /&gt;</code>)</li>
  <li>A group of radio buttons appear on the page, based on the selection made above.</li>
  <li>The user selects one of the radio buttons, which causes another set of radio buttons to appear and so-on.</li>
  </ol>
  
  <p>The first two steps are easy, and I've found plenty of examples for firing an Ajax call based on a dropdown selection. Adding one or more steps, however, based on the radio buttons has proven pretty challenging for me.</p>
  
  <p>I've been trying to use the information found at <a href="http://api.drupal.org/api/examples/ajax_example--ajax_example_graceful_degradation.inc/function/ajax_example_wizard/7" rel="nofollow">this link on api.drupal.org</a>, which promises to deliver exactly what I need - but have not been able to make it work. </p>
  
  <p>I copied the form to my module and I added the "<code>ajax_example_wizard_callback</code>" function that simply returns the form: <code>return $form</code>. I'm not sure if this is right or not, but all I have gotten working is the first step (asking for my name). When I click "next step" it just loads the same page again (or perhaps it's loading nothing... I'm not sure).</p>
  
  <p>Am I missing something? Has anyone been able to make this (example) work?</p>
  
  <p>This seems like a very useful thing to me, having multi-step, Ajax powered forms, but I have not been able to find a lot of discussion about it.</p>
  
  <p>Can anyone help?</p>