Ask a Question related to Coldfusion - Getting Started, Design and Development.
-
mpwoodward *TMM* #1
Re: Very basic form validation question
Tabla Junkie wrote:
If you're on CFMX 7 you can validate it this way within a cfform block:> I have a small form with fields for name, address, email, etc. I'm sending
> the completed form via cfmail, and would like the "from" field in the
> resulting email to appear to be from the email address entered in the form.
> I can do this with no problem, but what I can't figure out is how to
> validate the form so that the email form field is a required field and that
> leaving it empty will return either an error page or popup telling the
> person that their email address is required. Right now what happens is that
> if I leave the email field blank and then try to submit the form I get a
> Cold Fusion error message, which is fine for me but not fine for someone
> who doesn't know what it means.
>
> I'm pretty new at this and for the life of me I can't make sense of how to
> do this kind of validation, so any help would be appreciated.
> Thanks!
<cfinput type="text" required="yes" validate="email" message="Please
enter a valid email address." />
If you're not on CFMX 7 there are lots of javascript validation routines
you can use to do syntax checking on email addresses. Check
javascriptkit.com for some examples.
Matt
--
Matt Woodward
Team Macromedia - ColdFusion
mpwoodward *TMM* Guest
-
Form Validation Question?
Greetings A test-taker answers 42 out of 44 questions on an online test (form) using coldfusion. On submit, an error message needs to advise... -
CFFORM Validation trumping Custom Form Validation
Is there any way for custom form validation to work in concert with the cfform validation? I have a custom script that compares the values of two... -
form validation in asp.net
I want to verify that a email has been entered in a simple asp.net form that is being sent as an email. I found the RequiredFieldValidator Tag is... -
Form Validation Question
I have a form that I am trying to validate with javascript - the validation will work once but then if I go back into the form and try it again it... -
copy and paste form RTF document into field in asp form cause it to bypass field length and javascript validation - how to overcome?
I have a web form with several fields. If I copy & paste from a RTF document into a field, the javascript validation and field length are bypassed... -
sosueme #2
Re: Very basic form validation question
To build on this topic, how can I get a cfselect list to validate w/o sending
to the cf message? We have CFMX 7 server.
The code is
<cfselect name="location" size="1" required="Yes" message="Please select from
the list">
<option value="">Select</option>
<option value="here">here</option>
<option value="there">there</option>
<option value="everywhere">everyhere</option>
</cfselect>
sosueme Guest
-
Dan Bracuk #3
Re: Very basic form validation question
I don't understand this question.
Originally posted by: sosueme
To build on this topic, how can I get a cfselect list to validate w/o sending to the cf message? We have CFMX 7 server.
Dan Bracuk Guest



Reply With Quote

