I'm using the example out of Drupal Pro Development actually.
I have a menu callback, and my form alter is
function test_form_alter(&$form, &$form_state, $form_id) {
$form['field_one']['#prefix'] = '<div id="field-one">';
$form['field_one']['#suffix'] = '</div>';
$form['field_two']['#ahah'] = array(
'path' => 'test/stuff_js',
'wrapper' => 'field-one'
);
The form array contains the original fields, though they don't show on
the page or appear in the html. The values above appear in the form
array, but not in the field-info section.
On 12/29/2010 08:28 PM, Randy Fay wrote:
Please describe the entire sequence. *When* does a field disappear?
When you activate the #ahah-enabled element? That means you're most of
the way there, but you've put #prefix/suffix around both forms somehow
and are not returning a reasonable bit of markup.
Please make sure you dsm() or debug your form after altering to see
what you've actually got.
Are you using the base code provided by the AHAH Example in the
Examples project?