Drupal 7 #ajax incompatible with Ctools form wizard
According to Earl's comment on a related issue, there is an incompatibility between Ctools' Form Wizard tool and Drupal's #ajax functionality in Drupal 7.
It is because "#ajax's assumptions" about the $form it is dealing with prevents ctools form wizard implementations from supporting Drupal core's #ajax functionality--the form definitions and callbacks are stored in include files only loaded by ctools_wizard_multistep_form()--which is not available when Drupal core (includes/form.inc) tries to load and rebuild a given form wizard-embedded form (and it's validate function) for #ajax re-rendering. It is because the #ajax-enabled form structure which ajax.inc assumes it is dealing with directly is actually nested one level within ctools' form wizard.
The issue then seems to be the lack of a bridge between basic #ajax assumptions and ctools' wizardry.
- The #ajax['callback'] function must know the wizard form implementation (function) AND id (form wizard-named step) of the form to dig out of that wizard.
- Ctools form wizard ajax callback will need to answer that callback with a dig into its form steps for the specified form, a rebuild
Not sure what the solution will look like, but when I attempt to find a solution for this, I'll be looking first in includes/ajax.inc and then in ctools/includes/wizard.inc.