This content has been marked as final. Show 2 replies
Here is how I do it:
Adobe Community Expert
"nick.endgame" <firstname.lastname@example.org> wrote in message
> I am working on a script made by somebody else who has since left the
> The page i am working on basically allows a user to enter details such as
> and last name, username, password and email.
> This page is called adduser.cfm and obviously uses a form (html form not
> and when the form is submitted the action property calls itself
> When the page is reloaded, condition statements are used to verify data
> from the form i.e.:
> <cfif Not IsLoaded("form.submit")>
> "display form like normal"
> "check form fields and output apropriate message"
> Now, the problem i face is that if any of the form fields are not
> completed or
> not valid then i want to display an error message ideally without the form
> being submitted, because using the structure of the code written above
> allows the form to be displayed if the submit button hasn't been clicked.
> want to check the details before the form is submitted.
> I know you can use cfform validation but i need to perform validation such
> checking the email domain against an email already stored in a database
> then displaying a message ideally next to the form field with the error.
> this is the reason why i have a headache!!!!
> I hope i have explained my problem clearly. Also, I am afraid i cannot
> any of the code.
> Thanks and i appreciate any response.
I know you can use cfform validation but i need to perform validation
such as checking the email domain against an email already stored in a
database and then displaying a message ideally next to the form field
with the error.
disabled?". And this is the reason why i have a headache!!!!
Welcome to form validation. Best practice form validation is always a
two step process. You validate as much as you can on the client with
now incorporate server side logic with some effort.
But no matter what you do on the client, you can not TRUST it. There
many many ways that somebody can mess you up. You always re-validate on
the server anything that you validated on the client for UI niceness.
You may also add extra validation on the server that one is unable to
easily incorporate into the client.
Using the <cfform...> and other ColdFusion validataion tools just makes
this easier to create, but any client side validation is still done with