I am loading an html form inside of a container div. This html is a template that is retrieved from a data base. The use then fills out the form (or parts of the form).
once the user is done, they select a button that calls a function.
function submitForm() {
var workflowID = $('#workFlowID').val();
var formID = $('#formID').val();
var uploadedFiles = $('#uploadedFiles').val();
var htm = $('#formContent').html();
console.log(htm);
alert(workflowID + ", " + formID + ", " + uploadedFiles + ", : " + htm);
}
the problem is that I get the form faithfully reproduced, but the input fields are not included in the resulting “htm” I need to be able to reproduce the html as it has been filled in to save to a new table. What am I missing, or is this even possible?
having been asked for additional information; here is an example the html might have 10 input areas. Once the appropriate inputs are filled out the form is saved for someone else to look at and add there piece. When the form is filled out however the reference code above pulls back the html minus the values that were input by the user.
I found the answer the concept is to go through each tag and set the attribute.
then I can go back and do what I was attempting to do to begin with:
This will include the values entered in the html.
Thanks for all that responded and helped to point me in the right direction.