doubledee — 2012-03-17T16:52:07-04:00 — #1
Okay, probably a super dumb question here...
I have a Form which allows logged in Users to change their User Details. At the bottom of the Form is a "Change Details" button which saves the data.
Programatically, how do I make a "Cancel" button work so their original data reappears and everything is back to normal??
ren — 2012-03-17T18:00:13-04:00 — #2
doubledee — 2012-03-17T21:29:40-04:00 — #3
Is it the same conceptually as a "Cancel" button?
mittineague — 2012-03-18T04:28:09-04:00 — #4
Reset, errmm, resets the form to the values it had on page load. i.e. before the form gets submitted.
I guess it depends on where you want to change the values.
If after they submit, and on a "preview" page (before a database/filewrite commit) you could just send them back to the form.
If after a database/filewrite commit you need to save the previous values so they can be re-entered.