I have a form with a dynamically-generated group of fields – backend is php/mySQL, and the form is created by reading in data from a table and creating a group of fields for each record. The form has a bit of javascript onSubmit that confirms whether the user really wants to save their changes, but I’m having trouble reverting to the original values if they say that they don’t want to save. Reloading the page from the database is not an option.
I have a form with a dynamically-generated group of fields – backend is php/mySQL,
Share
Unless you’re doing something wildly unconventional, try:
Or if you need to do it in javascript: