Does the #AJAX FAPI property work on the body field? I've got it to work with things like submit buttons and textfields such as the title. When I alter the node edit form, and attach an #ajax
array to the body field though, nothing happens. I've tried multiple event types (keyup, keypress, focus). Is there anything special that needs to be done to get #ajax
to work on the body field?
// This works (creates backend xhr call).
$form['title']['#ajax'] = array(
'wrapper' => 'autopreview',
'callback' => 'autopreview_ajax_callback',
'method' => 'replace',
'event' => 'focus',
);
// Doesn't work.
$form['body']['#ajax'] = array(
'wrapper' => 'autopreview',
'callback' => 'autopreview_ajax_callback',
// 'method' => 'replace',
'event' => 'focus',
);
// Doesn't work.
$form['body']['und'][0]['#ajax'] = array(
'wrapper' => 'autopreview',
'callback' => 'autopreview_ajax_callback',
'method' => 'replace',
'event' => 'focus',
);