I guess I don't understand your response. My validation page is a separate CFInclude, so when someone click submit on the form page, they are sent to the form summary page. At the top of the summary page is an include to update the Session structure, then an include to do the validation. If all validation passes, then the remainder of the summary is displayed, if not, the end user is sent back to the form to make corrections.
Thanks, Mark -----Original Message----- From: Matthew Walker [mailto:[EMAIL PROTECTED]] Sent: Monday, July 01, 2002 1:07 AM To: CF-Talk Subject: RE: Aggregating server side form validation messages Why use cflocation at all? Why not simply cfinclude the form template? > -----Original Message----- > From: Mark Leder [mailto:[EMAIL PROTECTED]] > Sent: lundi 1 juillet 2002 16:57 > To: CF-Talk > Subject: Aggregating server side form validation messages > > > I'm doing both client side (JS) and server-side form validation. > Typically in JS Client side, if there are a number of required fields > not filled in by the user, upon submit, a single popup alert occurs > listing all the fields that need to be filled in. > > I want to do this same process with server side (using CFM) > as well. In > other words, using a first name field as an example, I'd like > to replace > the CFLOCATION statements in each check group (I could wind up with 30 > checks on the various field) with something that will "remember" the > #val# number and then lump them all one CFLOCATION statement > at the end > of the validation routine, such as: > > <CFLOCATION > URL="#REQUEST.webroot##REQUEST.Ssubwebroot#/default.cfm?pID=#U > RL.pID#&va > l=19a, 19b, etc." ADDTOKEN="No"> > > The &val= appendage would be dynamic, only having those > values which did > not pass the server-side validation. > > How would I accomplish something like this? > > ============================================== > > <!--- First Name ---> > <!--- Check that the field is required, 19a ---> > <CFLOCK SCOPE="SESSION" TIMEOUT="10" TYPE="READONLY"> > <CFIF SESSION.ecom.firstname IS ""> > <CFLOCATION > URL="#REQUEST.webroot##REQUEST.Ssubwebroot#/default.cfm?pID=#U > RL.pID#&va > l=19a" ADDTOKEN="No"> > </CFIF> > </CFLOCK> > > <!--- Check that the field has only alphabetical characters, 19b > ---> > <CFLOCK SCOPE="SESSION" TIMEOUT="10" TYPE="READONLY"> > <CFSET VARIABLES.testFirstName = > #IsAlphabet(SESSION.ecom.firstname)#> > </CFLOCK> > <CFIF VARIABLES.testFirstName IS "No"> > <CFLOCATION > URL="#REQUEST.webroot##REQUEST.Ssubwebroot#/default.cfm?pID=#U > RL.pID#&va > l=19b" ADDTOKEN="No"> > </CFIF> > > > =============================================== > > Thanks, > Mark > > ______________________________________________________________________ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

