Insert form fields into form
Instead of printing the form when you load it, create a new form item of type markup and add your subform there as markup.

$form['subform'] = array(
  '#type' =&gt; 'markup',
  '#markup' =&gt; $location,
);


This would fix the display order but your submit handler will need to handle the extra items.