Code Directory
 Visual Basic & VB.NET
New Code
Paste phpSoftPro 1.4.1
Bytescout PDF SDK
Odoo Crafito Theme 1.0
Uber Clone- Taxi Booking App 4.1
Excel Add-in for BigCommerce 1.7
Online Food Delivery Script php 1.0.3
Break Script | Youtube Clone Script 1.0.3
Advanced Content Manager Magento 2 extension 2.2.x
dbForge Studio for PostgreSQL 1.0
ODBC Driver for Salesforce MC 1.3
Social Media Script 1.0
ByteScout PDF Renderer SDK
Magento Mobile App Builder 2.0.0
Binary MLM Plan 1.0.2
Review Assistant 4.0
Top Code
Online Food Delivery Script php 1.0.3
Online Food Ordeing System 1.0
Simplified Gradient Descent Optimization 1.0
Java-2-Pseudo 1.0
Issue Manager App 1.0
Ping Pong Game Code Script 1.1
Uber Clone- Taxi Booking App 4.1
Memory (a.k.a. Concentration) 1.0
Gradient Descent Visualization 1.0
Planyo online reservation system module 6.x-1.8
Phase Locked Loop Synthesis and Simulation 1.0
Binary MLM Plan 1.0.2
Code Box Editor 1.1
UHEvents - Event management 1.0
Chess Master 1.0
Top Rated
Output Messenger 1.8.0
Aliexpress Clone- Ec21 Script 1
Indiegogo Clone 3.0
Online Food Ordeing System 1.0
PHP Image Resize Script 1.0
Best Spotify Clone 1.0
Get Random Record Based on Weight 1.0.0
PHP Point of sale 10.0
Travel Portal Script 9.29
Magento Product Designer 1.0
OFOS - Just Eat Clone Script 1.0
PrestaShop Upload Images Module 1.2.1
Trading Software 1.2.4
Deals and Discounts Website Script 1.0.2
ADO.NET Provider for ExactTarget 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