This was a technique that I read about on this list that someone
was using. Since I'm not a "_javascript_er" it allowed validation
without CFFORM or CFINPUT's and not having the user leave the
form entry page.
The form does submit back to the same page, then runs through
the cftry's and then, if everything passes validation, I convert the
form variables to session variables and send them via cflocation
to an action page for processing. I could have the
processing (inserting, updating, etc.) happen on the same page
as the validation and then send the user to a "Submission Successful" page
that doesn't process anything, but just let's the user know that everything
went through without a problem.
That way I could avoid using the session variables, which is not a problem,
but more coding, and could also solve the problem of specifying the
"multipart/form-data"
specification for the submission, since it would be submitted to the
processing page.
Sounds like your idea of keeping the processing on the same page
as the submission is much simpler...
Any other thoughts?
Thanks for your help...
Rick
-----Original Message-----
From: Matt Robertson [mailto:[EMAIL PROTECTED]
Sent: Monday, May 17, 2004 4:35 PM
To: CF-Talk
Subject: Re: How to validate form variables with this method including
Encoding: multi-part/form-data
Rick,
Why are you doing that cflocation to finish processing? Why not do your
form processing right then and there on the current template?
Not that everyone has to do it this way, but I typically build a form
where it submits to itself and, 1)validates 2)processes and 3)proceeds (i.e.
[b]"thanks for filling out the form. We love you."[/b].
If I had form processing code that needed to be shared with something else
(maybe thats why you're doing the cflocation?) I would use an include or a
cfmodule call.
--
-------------------------------------------
Matt Robertson, [EMAIL PROTECTED]
MSB Designs, Inc. http://mysecretbase.com
-------------------------------------------
--
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

