function test_menu() {
$items = array();
$items['test/dropdown/callback'] = array(
'page callback' => 'test_do_callback',
'type' => MENU_CALLBACK,
'access_callback' => TRUE,
);
return $items;
}
function test_form_alter(&$form, &$form_state, $form_id) {
if ($form_id == 'test_profile_node_form') {
$form['field_two']['#prefix'] = '<div id="field-two-wrapper">';
$form['field_two']['#suffix'] = '</div>';
$form['field_master']['#ahah'] = array(
'path' => 'test/dropdown/callback',
'wrapper' => 'field-two-wrapper'
);
$form['field_master']['#tree'] = TRUE;
}
}
function test_do_callback() {
// do stuff here
}
Next issue. My callback isn't being hit when I change the value in the
master dropdown. I have the code below...simplified, albeit apparently
wrong. Unlike the examples, the #ahah being added to the field does not
result in any ahah references in jQuery.extend(Drupal.settings.
- [development] Searching for AHAH! instead of AHAH? jeff
- Re: [development] Searching for AHAH! instead of AHAH? Randy Fay
- Re: [development] Searching for AHAH! instead of AH... jeff
- Re: [development] Searching for AHAH! instead o... Randy Fay
- Re: [development] Searching for AHAH! inste... jeff
- Re: [development] Searching for AHAH! inste... jeff
- Re: [development] Searching for AHAH! inste... jeff
- Re: [development] Searching for AHAH! ... Randy Fay
- Re: [development] Searching for AH... Earl Miles
- Re: [development] Searching fo... Randy Fay
- Re: [development] Searching fo... Pierre Rineau
- Re: [development] Searching fo... Earl Miles
- Re: [development] Searching for AH... jeff
- Re: [development] Searching for AH... jeff
- Re: [development] Searching for AH... jeff
- Re: [development] Searching fo... jeff
- Re: [development] Searching fo... John Fiala
