[development] groking ajax callbacks
Peter Wolanin
pwolanin at gmail.com
Tue Jan 1 13:22:37 UTC 2008
Augustin,
The #ahah element was (if I recall) added after the major changes to
the book module went in. So The page I pointed you two predates its
existence (and is thus obviously incomplete). quicksketch and
dmitrig01 tweaked the book module form to include #ahah later. You
might be able ask them for some help with the docs.
http://cvs.drupal.org/viewvc.py/drupal/drupal/modules/book/book.admin.inc?r1=1.3&r2=1.4
-Peter
> ---------- Forwarded message ----------
> From: "Augustin (Beginner)" <drupal.beginner at wechange.org>
> To: development at drupal.org
> Date: Tue, 1 Jan 2008 18:37:30 +0800
> Subject: Re: [development] groking ajax callbacks
>
>
> Neil, Earl, Peter, all,
>
>
> thanks for your replies.
>
>
> I have added your various links in the API section of the handbook:
> http://drupal.org/node/205296
>
> As far as book.module is concerned, the bit that I missed was the
> #ahah part in the form:
>
> // Add a drop-down to select the destination book.
> $form['book']['bid'] = array(
> '#type' => 'select',
> '#title' => t('Book'),
> '#default_value' => $node->book['bid'],
> '#options' => $options,
> '#access' => (bool)$options,
> '#description' => t('Your page will be a part of the selected
> book.'),
> '#weight' => -5,
> '#attributes' => array('class' => 'book-title-select'),
> '#ahah' => array(
> 'path' => 'book/js/form',
> 'wrapper' => 'edit-book-plid-wrapper',
> 'effect' => 'slide',
> ),
> );
>
> I found out that the #ahah attribute is completely undocumented, so I
> added a placeholder for it in the FAPI reference:
> http://api.drupal.org/api/file/developer/topics/forms_api_reference.html#ahah
> (my addition might take a few hours to appear).
>
> It's only a placeholder though. Someone more knowledgeable needs to
> complete the doc, there. If nobody does it, at least developers would
> be made aware that there is such a thing as #ahah in FAPI.
>
> Is that something new in Drupal 6 ?
> [edit: it seems to be. It is mentioned in a very unlikely place:
> http://drupal.org/node/114774#choice_check .
> Why not in Peter's AJAX page?]
>
>
>
>
>
>
> Blessings,
>
> Augustin.
>
>
>
>
>
>
>
>
> --
> [ Drupal development list | http://lists.drupal.org/ ]
>
More information about the development
mailing list