Code Directory
 Visual Basic & VB.NET
New Code
The C# Excel Library 2020.5
dbForge Studio for MySQL 9.0
LinkedIn Clone 2.2
Uber clone Apps 4.0
Cab Booking Script 1.3.2
Airbnb Clone HomestayDNN 3.0
Magento Language switcher 1.2.1
The .Net PDF Library 2020.3.2
IP2Location Geolocation Database 2020.5
ODBC Driver for MailChimp 2.0
ODBC Driver for NetSuite 2.0
ODBC Driver for SQL Azure 3.1
dbForge Schema Compare for Oracle 4.1
dbForge Data Compare for Oracle 5.1
dbForge Studio for Oracle 4.1
Top Code
dbForge Studio for MySQL 8.1
dbForge Studio for Oracle 3.10
dbForge Schema Compare for Oracle 2.7
dbForge Data Compare for Oracle 3.7
IP2Location Geolocation Database 2020.5
Availability Booking Calendar PHP 1.0
ATN Site Builder 3.0
Azizi search engine script PHP 4.1.10
ATN Resume Finder 2.0
Invoice Manager by PHPJabbers 3.0
Single Leg MLM 1.2.1
PHP Review Script 1.0
ICPennyBid Penny Auction Script 4.0
Extreme Injector 3.7
ODBC Driver for MailChimp 2.0
Top Rated
phpEnter 5.1.
Single Leg MLM 1.2.1
Azizi search engine script PHP 4.1.10
Paste phpSoftPro 1.4.1
Extreme Injector 3.7
Deals and Discounts Website Script 1.0.2
Solid File System OS edition 5.1
Classified Ad Lister 1.0
Aglowsoft SQL Query Tools 8.2
Invoice Manager by PHPJabbers 3.0
ICPennyBid Penny Auction Script 4.0
PHP Review Script 1.0
ATN Resume Finder 2.0
ATN Site Builder 3.0
Availability Booking Calendar PHP 1.0
AHAH helper 6.x-2.2
File ID: 98238

AHAH helper 6.x-2.2
Download AHAH helper 6.x-2.2 Error Link
License: Freeware
File Size: 10.0 KB
Downloads: 1
Submit Rating:
AHAH helper 6.x-2.2 Description
Description: Drupal 6's Forms API is great, but its AHAH support (a technique similar to AJAX) is lacking. You have to write a menu callback for every AHAH-enabled form item of your form. This is time consuming, hard to maintain and hard to write tests for. Not to mention that the code for those menu callbacks is not easy to understand, yet always the same. ("What's that piece of code for?" d-deOCt "I'm not sure, it's just necessaryd-deTZ") See my blog post about this if you want more details:
Notes about version 2

Version 2 of this module simplifies the usage a lot and contains a much improved example. My blog post is slightly outdated: in version 2, the #first_time property no longer exists: it was too cumbersome to use. Instead, validation is only performed when a button is pressed, not when an AHAH event fires because of a changed select, for example. See this issue for details.

It allows you to:

1. not write any menu callback at all.
2. still not write any javascript at all.
3. have a sole, central form definition function that has some if-tests to support a changing form based on the user's input, i.e. by checking $form_state['values'] and/or $form_state['storage']. This is in fact the exact same system you've been applying if you've already written multi-step forms. This makes sense, because AHAH forms are in fact normal multi-step forms, that just happen to be updatable through AHAH as well.
You still have to use the #ahah property and set a wrapper, but you provide a "magical path" that will automatically rebuild and render the desired part of the form. If the part of the form that you want to be rendered is $form['fapi']['rocks'] then you would do 'path' => ahah_helper_path(array('fapi', 'rocks')) and that's it.
Adding graceful degradation just became really easy: just create buttons with the appropriate text, set '#submit' => array('ahah_helper_submit'), and off you go. You'd probably create such a button for every AHAH-powered form item. The exact same code will be used as when javascript would be enabled. (If you've got a AHAH-powered select called 'Usage', you'd probably name the button 'Update usage'. You get the point.)
And thanks to these buttons, writing functional tests now becomes trivial as well. Because the same code is used when javascript is disabled (through the buttons) or enabled (through AHAH callbacks), just press the buttons in your tests and you'll be fine!
4. skip form validation for all AHAH updates that do not call validate or submit callbacks.
5. have new AHAH-powered form items added in an AHAH callback (previously not supported).

Look at the included ahah_helper_demo module for an example.

License: Freeware

Related: Buttons, Write, you039ve, Tests, ahahpowered, callbacks, Callback, Button, vascript, Forms, Module, Property, enabled, Version

O/S:BSD, Linux, Solaris, Mac OS X

File Size: 10.0 KB

Downloads: 1

More Similar Code

This is a helper module that allows the returned data from an AHAH callback to specify the function to be called. It also allows an additional function to be called before AHAH submission. This module is used by the Autotag module.

Development of this module was carried out by Ben Scott, with minor additional development by Simon Rycroft and funded in part by the EDIT Scratchpads project

This helper class gives easy access to callback event data in GUIs developed using GUIDE. Several Handle Graphics callback functions, such as the uicontrol's KeyPressFcn and the figure's WindowScrollWheelFcn, pass useful information through the...

Ahah forms is a utility module, for adding Ajax/javascript driven incremental page reloading, without needing to write any javascript.

This framework uses the FormAPI to generate the necessary javascript. The key is the #ahah_binding...

Tweetbacks Helper is a helper Plugin for Tweetbacks Plugin to help it detect more tweets.


This Plugin can disable Pseudo cron scheduler by Tweetbacks and replace it with its own scheduler, that can be invoked by...

Without this module, if during the processing of an AHAH callback, css files are added using drupal_add_css() but those files aren't already loaded on the base page from which the AHAH request originated, then those files don't get loaded. This is...

Without this module, if during the processing of an AHAH callback, javascript files are added using drupal_add_js() but those files aren't already loaded on the base page from which the AHAH request originated, then those files don't get loaded....

This module provides a way for modules to store information about the state of a page as it changes during AHAH callbacks. It provides no end-user functionality, but gives an API for other modules to use. Examples of modules using this are...

Mail Merger Helper simplifies the process of Mail Merge in Microsoft Word by allowing the user select a data source file and a MS Word document in the same screen.

This is a helper module for the DrupalMU installation profile.

Since DrupalMU has been replaced and is no longer maintained, this helper module isn't either.

The maintenance helper provides features to assist site admins in performing maintenance on their site. It provides a permission to login and allows admins to set a configurable message to appear on all pages of the site.

User Review for AHAH helper
- required fields

Please enter text on the image