Tuesday, 09 February 2010

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.

File attachment: 

Written byMatthias Vandermaesen

With degrees in History and Applied Informatics he found his perfect match at the City Archives of Antwerp where he did research on digitalization and digital dissemination of audiovisual cultural heritage. Dabbling with PHP and MySQL, and blogging with Wordpress he eventually actively participated in the fast ever evolving world of web. He chose Krimson to become a fully fledged Drupal ninja. Comes from infamous Bruges to Antwerp really for espionage. Secret Service reports can be read on http://netsensei.nl (The Dutch Connection) He pretends to listen to his own music when all he does is tap wires while he works.

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> <img> <h4> <br>
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. The supported tag styles are: <foo>, [foo].
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.
QR-code Krimson Antwerpen

Antwerp

Zénobe Grammestraat 34
2018 Antwerp, Belgium
Call us: +32 (0)3 298 69 98
E-mail us: info@krimson.be
QR-code Krimson Gent

Ghent

Hof ter Dampoort
Dendermondsesteenweg 48A - 101
9000 Gent, Belgium
E-mail us: info@krimson.be

Contact us

By submitting this form, you accept the Mollom privacy policy.