Fix form replacement

Before, when using the jQuery form.reset() function, sometimes the form
would not properly reset, probably having something to do with the fact
that the form can be loaded and replaced multiple times via ajax on the
same page.

Now, we are replacing the form with new html coming from the server
side, guaranteeing that it is empty.