One thing that I have done to avoid this problem without resorting to session variables is this:
1. CFPARAM all of your form variables on your originating page, defaulting them to zeros or blanks/nulls. 2. In your originating form, seed the VALUE attributes with your CFPARAMed variables. 3. On the receiving page, CFPARAM your variables, defaulting them to the form variables that were submitted. 4. Dump the received form variables into a hidden form. 5. Do any error checking/variable scrubbing. 6. If you find any problems, submit your hidden form back to the originating page. This will pass all of the submitted variables back to the original form for ready (re)use. It also provides a convenient way to pass a customized error message back to the form, as well as a potential "onLoad" variable to pre-select the field that is causing problems. When the original page loads, check for a passed error message and if it's there, display it. Nate Rightmire, Web Developer Shorr Packaging Corp. 800 N. Commerce St., Aurora, IL 60504 tel: 630.499.3090 email: [EMAIL PROTECTED] www.shorr.com www.shorrexpress.com -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Keith Purtell Sent: Tuesday, March 02, 2004 8:13 AM To: [EMAIL PROTECTED] Subject: RE: [KCFusion] Web form data missing on return Yes I'm just talking about the Back button. I can't find any official rules about how the browser is supposed to behave, or reasons why it might occasionally fail to retain the form input. Oh well, looks like CF will have to come to the rescue. I have another more recent form problem which I will post separately. Keith Purtell, Web/Network Administrator VantageMed Operations (Kansas City) CONFIDENTIALITY NOTICE: This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Behalf Of Adaryl "Bob" Wakefield > Sent: Monday, March 01, 2004 5:53 PM > To: [EMAIL PROTECTED] > Subject: Re: [KCFusion] Web form data missing on return > > > OK if you hit the back button the page just reloads with the > information that got posted minus of course any password fields. If > you are talking > about doing a <cflocation> when validation fails then yes the > fields are not > going to be filled in cause you are getting a new (fresh) > page. Your on the > right track though. When I have several forms were the input > is stored in > session vars for validation. Once eveything is all hunky dory > I delete the > vars. > A. > > ----- Original Message ----- > From: "Keith Purtell" <[EMAIL PROTECTED]> > To: "KCFusion (E-mail)" <[EMAIL PROTECTED]> > Sent: Monday, March 01, 2004 4:14 PM > Subject: [KCFusion] Web form data missing on return > > > > I'm trying to diagnose a sporadic behavior with Web forms. > I can fix this > by writing form input to > > session variables, but first I'd like to know what's going > on. We have > many forms on our intranet > > where the user completes the required fields then clicks > "Submit" for > validation and processing. The > > issue involves situations where our validation JavaScript > on page one > either didn't or couldn't > > catch everything, but ColdFusion form validation on the > next pages does > catch something, and the > > user has to go back. What we're seeing is that in some > cases the values > the user entered in the form > > are still there when they click "Back", but in other cases > the values are > gone and they have to > > re-enter everything. I can't find a consistent reason. Any ideas? > > > > Keith Purtell, Web/Network Administrator > > VantageMed Operations (Kansas City) > > > --- [This E-mail scanned for viruses by Declude Virus] ========================================================= Kansas City ColdFusion User Group's website & listserv is hosted through the generous support of Clickdoug.com To send email to the list, email [EMAIL PROTECTED] To (un)subscribe, email [EMAIL PROTECTED] with your request. For hosting solutions http://www.clickdoug.com Featuring Win2003 Enterprise, RedHat Linux, CFMX 6.1. ====================================================== ========================================================= Kansas City ColdFusion User Group's website & listserv is hosted through the generous support of Clickdoug.com To send email to the list, email [EMAIL PROTECTED] To (un)subscribe, email [EMAIL PROTECTED] with your request. For hosting solutions http://www.clickdoug.com Featuring Win2003 Enterprise, RedHat Linux, CFMX 6.1. ======================================================
