5 Replies Latest reply on Jul 13, 2006 9:37 PM by Newsgroup_User

    Remembering form fields

    Level 7
      While this is quite easy in Classic ASP, I fear this will be a lot of coding
      in CF. lol

      I have a new member registration form that checks the username first prior
      to continuing onto the next reg page.

      If the member chooses a username that already exists they are directed back
      to the page with a message that states that the username has already been
      chosen which is a simple <cfif> that takes the value from the URL and states

      <cfif username NEQ "">Sorry, that username has already been taken, please
      try again!</cfif>

      That works fine...however.. All the form fields return to blank.

      In ASP I just binded the values of the fields to URL and passed all the used
      variables to the URL string (long and annoying, but worked fine).

      If there were no variables, i.e. the page was first launched, all the text
      areas came up blank. In CF it tells me that all the variables do not exist.

      Would I have to use <CFparam> to create all blank variables to start and
      then bind the text fields to them, which will cause the change if the
      username is taken or is there a simple clean way to do this without the
      hassle of creating variables first.

      All I am looking for it to do, if the username is taken, is to show the
      message and keep all the entered information in the text fields, except the
      originally chosen username, so they don't have to reenter EVERYTHING over
      again each time.


      Wally Kolcz
      Developer / Support