I have two forms (A & B) in custom module. Form A containing three fields(each field is dependent drop down) and Form B containing only one field (markup field to show data). The problem is that when I change either field from Form A then its dependent fields within form A an also markup field from Form B should be updated via ajax.
Here is the callback function used in FORM A. After calling, it returns fields from Form A. But I want it also return field of FORM B. (One Callback to render two forms at a time)
<?php
function mymodule_ajax_callback($form, $form_state) {
return array(
'#type' => 'ajax',
'#commands' => array(
ajax_command_replace("#key_wrapper", render($form['keys'])),
ajax_command_replace("#display_wrapper", render($form['display'])),
),
);
}
?>