I won't have a chance to look at this tonight, but just a comment that is probably irrelevant:<br><br>It's highly unusual to set #tree on a portion of a form rather than the whole form. #tree makes $form_state['values'] have its values in a hierarchical, rather than flat, arrangement, and it's not clear why you would want that. It's also rather dangerous to mess with #tree when you're form-altering, as it changes what will happen for other participants in the form.<br>
<br>One thing you should make sure to check: Is ahah.js being loaded on the page? Just check with firebug. If it's not, you may have to load it explicitly.<br><br>-Randy<br><br><div class="gmail_quote">On Wed, Dec 29, 2010 at 11:03 PM, <span dir="ltr"><<a href="mailto:jeff@ayendesigns.com">jeff@ayendesigns.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">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.<br>
<br>
<br>
function test_menu() {<br>
$items = array();<br>
$items['test/dropdown/callback'] = array(<br>
'page callback' => 'test_do_callback',<br>
'type' => MENU_CALLBACK,<br>
'access_callback' => TRUE,<br>
);<br>
<br>
return $items;<div class="im"><br>
}<br>
<br>
function test_form_alter(&$form, &$form_state, $form_id) {<br></div>
if ($form_id == 'test_profile_node_form') {<br>
$form['field_two']['#prefix'] = '<div id="field-two-wrapper">';<br>
$form['field_two']['#suffix'] = '</div>';<br>
<br>
$form['field_master']['#ahah'] = array(<br>
'path' => 'test/dropdown/callback',<br>
'wrapper' => 'field-two-wrapper'<br>
);<br>
$form['field_master']['#tree'] = TRUE;<br>
}<br>
}<br>
<br>
<br>
function test_do_callback() {<br>
<br>
// do stuff here<br>
<br>
}<br>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>Randy Fay<br>Drupal Module and Site Development<br><a href="mailto:randy@randyfay.com">randy@randyfay.com</a><br>+1 970.462.7450<br><br>