call external form in ajax callback I have two forms (A &amp; 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)

&lt;?php
 function mymodule_ajax_callback($form, $form_state) {
     return array(
        '#type' =&gt; 'ajax',
        '#commands' =&gt; array(
            ajax_command_replace("#key_wrapper", render($form['keys'])),
            ajax_command_replace("#display_wrapper", render($form['display'])),
        ),
     );
 }
?&gt;
You can use..

function custom_conditional_form($form, &amp;$form_state) {
  $form['form1']['drupal_love'] = array(
    '#title' =&gt; t('Do you love Drupal?'),
    '#type' =&gt; 'radios',
    '#options' =&gt; array('yes' =&gt; t('Yes'), 'no' =&gt; t('No')),
  );
  $form['form1']['how_much_love'] = array(
    '#title' =&gt; t('Great! Tell us more:'),
    '#type' =&gt; 'textfield',
    '#states' =&gt; array(
      'visible' =&gt; array(
        ':input[name="drupal_love"]' =&gt; array('value' =&gt; 'yes'),
      ),
      'required' =&gt; array(
        ':input[name="drupal_love"]' =&gt; array('value' =&gt; 'yes'),
      ),
    ),
  );
  $form['form1']['submit'] = array(
    '#type' =&gt; 'submit',
    '#value' =&gt; t('Save'),
  );

  return $form;
}