SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: Cancel Button

Hybrid View

  1. #1
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,756
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Cancel Button

    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??


    Debbie

  2. #2
    SitePoint Wizard Ren's Avatar
    Join Date
    Aug 2003
    Location
    UK
    Posts
    1,060
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <input type="reset">

    Ren

  3. #3
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,756
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Ren View Post
    <input type="reset">

    Ren
    Is it the same conceptually as a "Cancel" button?


    Debbie

  4. #4
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    16,998
    Mentioned
    186 Post(s)
    Tagged
    2 Thread(s)
    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.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •