Call us: +32 (0) 3 298 69 98
Email us: info@krimson.be
Call us: +32 (0) 3 298 69 98
Email us: info@krimson.be
Asynchronous HTTP And HTML or AHAH is a technique which allows you to update parts of a DOM without reloading the entire page. In Drupal, AHAH refers to adjusting forms dynamically by changing a part of a form based on input given in other form elements without a page reload.
While Drupal 5 was downright lacking support for AHAH driven forms, it became part of the FAPI in Drupal 6. Module developers are able to design dynamic forms without worrying about writing complex JQuery. Yet, implementing and debugging AHAH in a secure and maintainable fashion is still tricky business.
Good documentation on the subject is scarce and differs greatly codewise. Luckily, Wim Leers' AHAH Helper module brings a good deal of relief for simple AHAH forms. Extensive knowledge of the way the FAPI works is still indispensable if you want to build complex forms.
A while back, I faced the challenge of implementing an AHAH driven form and learned quite a few things about AHAH and the FAPI.
I've bundled what I've learned and gave a talk about AHAH at Fosdem 2010. Attached to this post, you'll find a zip bundle with my presentation and a few AHAH example modules.
Although AHAH is still very challenging in D6, the D7 development team has made several significant changes to the FAPI. AHAH became part of the new AJAX framework that comes with D7 core which will simplify development significantly.
Note: the example modules are not final, they need a bit of cleaning and commenting, so I will replace these with a final version in the near future.
| Attachment | Size |
|---|---|
| AHAH_crash_course.zip | 303.57 KB |