I have AHAH on many multistep forms. There are 3 forms, 3 of which work, but one of the forms has a second AHAH element on the second step doesn't work. It just appears to stop the form from carrying on loading.

Attached are the 2 different examples.

When the button has been pressed the address fields should disappear and the select will appear.

But when it doesn't work then fields just grey slightly and the browser appears to hang.

This is the code in question:

$form['contact']['find'] = array(
  '#type' => 'button',
  '#value' => t('Find Address'),
  '#ahah_bindings' => array(
    array(
      'event' => 'click',
      'path' => 'pca/js',
      'wrapper' => 'target',
    ),
  ),
  '#suffix' => '<div id="target">',
);

With the closing

on another field further down.

The code for each form element is identical, the only difference being the one that doesn't work is on step 2 of a form, whereas the others are all on step 1.

CommentFileSizeAuthor
hung.jpg9.16 KBjamestombs
working.jpg10.34 KBjamestombs

Comments

jamestombs’s picture

Status: Active » Fixed

Managed to fix it by using the patch on the following Issue for AHAH Forms Framework: #180412: AHAH bindings do not work with 2+ forms on a page.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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