Form API + AJAX - Form doubles itself on submit
The issue you are facing is that you are not wrapping your form with the wrapper div, you're prepending a div to your form. When the ajax form is loaded, it is inserted into this wrapper div, rather than replacing the contents of the form.

Change this:

$form['wrapper'] = array("#markup" =&gt; "&lt;div id='status'&gt;&lt;/div&gt;");


To this:

$form["#prefix"] = "&lt;div id='status'&gt;";
$form["#suffix"] =&gt; "&lt;/div&gt;";


This will wrap your form in the #status div.