The AHAH example should specify all values, even defaults (with a note to say this is the default).

Things like #ahah['event'] have different defaults for different kinds of fields, so it's easy to trip up here.

CommentFileSizeAuthor
#3 803070.examples.ahah-defaults.patch2.08 KBjoachim

Comments

rfay’s picture

Title: give all AHAH default values » Provide more #ahah members in the example (but commented out)

The examples are intended to give the most basic introduction to the use of something, without introducing extraneous detail, and that's why they're using the defaults. The defaults also work for what most people want to do.

I would propose adding the other #ahah['event'] options in a comment, for example, and to add the additional #ahah members *commented out* so that it's obvious to people that they don't have to be entered.

Patches are welcome if you'd like to take this on. http://drupal.org/patch.

Thanks for your participation and for the good thinking,
-Randy

rfay’s picture

Category: bug » task
joachim’s picture

Status: Active » Needs review
StatusFileSize
new2.08 KB

Here's a patch.

One of the examples was actually needlessly setting the 'event', so I've replaced that with a commented out version too.

This is probably the only one we need: the replace and effect properties have clear defaults that never change.

rfay’s picture

Version: 6.x-1.x-dev »
Status: Needs review » Patch (to be ported)

Committed to HEAD: http://drupal.org/cvs?commit=369456

Thanks!

A D7 patch would also be appreciated.

tr’s picture

Version: » 7.x-1.x-dev

Setting version.

mile23’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev
Issue summary: View changes
Status: Patch (to be ported) » Fixed

There's no AHAH example in 7.x-1.x. I doubt it needs to be ported, either, since we have the AJAX example.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.