I haven't started coding this yet, so I don't have anything to show. I'm still trying to work out HOW to start. I will have a page that will have various forms on it depending on what the visitor is trying to do. I could put them all in hidden divs and just un-hide them as needed, and update certain field/values with ajax, but that doesn't seem the best idea to me.
Instead, what I was thinking was to send an ajax request to my server and return the HTML of a form, but If I remember correctly, that form won't actually be added to the DOM simply by writing it to the document.
So, my question is either "How do I add that HTML form with all its inputs into the DOM, overwriting any conflicting elements?" or "How should I dynamically add/replace a form on a page."
I am willing to use plain JS or JQuery for this. I use PHP for my server-side code.