Embed form within a form I am building on an existing site, adding / modifying functionality to it. 

There is a form, which is a part of a (sort of a) multi-step form which I need to alter, and add another form to it.

So, I added the following to the existing form:

// Some form elements above this.
$form['new_form_element']['search'] = drupal_get_form('MY_PROJECT_search_form');
// Some form elements after this


And the MY_PROJECT_search_form function returns the form, which is then embedded in the original form. The form is rendered properly.

However, when I submit the form, I get the following notice :


  The form has become outdated. Copy any unsaved work in the form below and then reload this page.


I believe that is because the two forms are getting submitted at the same time, and the submission of one of them is failing.
I have tried adding $form_state['rebuild'] = TRUE to the submit functions, but it did not work.
I have also tried adding an markup type field and embedding form in as
'#markup' = render(drupal_get_form('MY_PROJECT_search_form'));
But, I am not able to implement AJAX in the embedded form after that.

Is there any other better way to embed a form?

Note: There is no other option then to embed a separate form to the current form.
Nesting forms in other forms is not valid in html.
see this post 
html nesting forms in forms 

You can always try calling the form directly via the actual form function instead of via drupal_get_form since the function returns a valid array of form elements. 
you'll have to somehow compensate for the missing hook_form_alter and hook_form_FORM_ID_alter. 

Note I haven't actually tried this, so I'm not sure how it will react on the empty $form/$form_state params. 

That already gets you all the fields in a dynamic way. 
Perhaps you can build a similar work around calling the submit/validate handlers directly too.