I think I may be getting what you're saying...I'll tinker with this and see
what I can come up with...
Rick
-----Original Message-----
From: Matthew Walker [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 22, 2004 9:19 PM
To: CF-Talk
Subject: RE: Is there a way to have all CFCatch messages display at once?
Don't throw an error - just concatenate your error message to a string of
error messages. Then after validation, if the error string has any length,
dump it out to screen and reinclude the form. If you like you can also
build
a list of error fields as you validate, then highlight them as you
redisplay
the form. That's exactly what TerraForm does.
Matt.
_____
From: Rick Faircloth [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 23 June 2004 1:19 p.m.
To: CF-Talk
Subject: RE: Is there a way to have all CFCatch messages display at once?
Let see...so how would that be coded?
How do I validate the "entire" form as opposed to the typical technique
below?
<CFTRY>
<CFIF Form.FirstName is "">
<CFTHROW Type="AddError"
Message="Please enter your first name.">
</CFIF>
<CFIF Form.LastName is "">
<CFTHROW Type="AddError"
Message="Please enter your last name.">
</CFIF>
<CFCatch Type="AddError"
<CFOUTPUT>#CFCatch.Message#</CFOUTPUT>
</CFTRY>
Rick
-----Original Message-----
From: Adrocknaphobia [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 22, 2004 8:55 PM
To: CF-Talk
Subject: Re: Is there a way to have all CFCatch messages display at
once?
Yeah, the array is the way to go. Validate the entire form and append
each message to the array. Although rather than blast a user with all
those errors, why not do something more subtle like highlight the
invalid form fields with another color.
-Adam
----- Original Message -----
From: Rick Faircloth <[EMAIL PROTECTED]>
Date: Tue, 22 Jun 2004 20:57:59 -0400
Subject: Is there a way to have all CFCatch messages display at once?
To: CF-Talk <[EMAIL PROTECTED]>
Hi, all.
I run my validation on forms by having a form submit back to the page
it's
on,
then just use CF code validation (since I know little about _javascript_)
and then, either showing a CFCatch error or processing the form
successfully,
then CFLocating to a confirmation page.
This works fine for my rather limited validation needs, but it's
annoying
that
a user has to receive one CFCatch error message a time.
Is there some way, with the CFTRY / CFCATCH approach to validation,
to have all the form fields validated and have the CFCATCH error
messages
grouped together in an array or something, then have them displayed all
at
once?
i.e...
> You must enter a first name.
> You must enter a last name.
> You must enter your age.
etc., etc., etc...
Ideas?
Rick
--
Outgoing mail is certified Virus Free.
Checked by AVG Anti-Virus (http://www.grisoft.com).
Version: 7.0.251 / Virus Database: 263.3.3 - Release Date:
6/18/2004________________________________
_____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

