I have following problem:
In my code, I dynamically create forms as strings and insert them into the DOM using JQuery. Specifically, there are elements that you can right click to "customize" them using the forms mentioned. After the user inputs his customization options, I serialize and store his inputs as well as the whole string of the element's form. Now, if the user wants to "customize" the element again, I want the form to show the inputs that the user already saved, e.g. text fields should already hold the value that the user typed in. Is there an easy way to do this? For example, is there a way to store the whole html (with "value" attributes set to what the user typed in, a radio button having the "checked" attribute etc) of a form?
So far I tried to get this done by using string.replace() , but as I create the forms dynamically, I don't know in advance how many radio buttons etc there's gonna be so it's hard to get this right.