This makes sense but still not working. I tried using the validate and that has no effect. It just passes over all the required fields and goes right to the action page.

 

 

I tried this…

 

<cfinput name="user_student_id"

                                     required ="yes"

                                     message="Please Enter a Student ID"

                                     type="text"

                                     id="user_student_id"

                                    />

 

This…

 

<cfinput name="user_student_id" validate="noblanks"

                                     message="Please Enter a Student ID"

                                     type="text"

                                     id="user_student_id"

                                    />

 

And this…

 

<cfinput name="user_student_id" validate="noblanks,required"

                                     message="Please Enter a Student ID"

                                     type="text"

                                     id="user_student_id"

                                    />

 

 


-------------------------------------

Chris C. Cooper

Cooper e.Business Solutions

Atlanta, Georgia
404.691.4816

 

Cooper e.business Solutions – http://www.cooperebusiness.com

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Teddy Payne
Sent: Wednesday, September 27, 2006 10:51 AM
To: discussion@acfug.org
Subject: Re: [ACFUG Discuss] Form Validation

 

Well then, you won't really need to specify validation locations on your individual form controls.  Let the cfform do the client side first and then you can manipulate the server side on your action page.

The issue you may be having is having the required attribute with the validate attribute in the same cfinput.  Validate and requried as two different validations really.

A simple approach that may life easier would be:

<cfinput type="text" name="foo" id="foo" validate="noblanks,required" message="Foo is required you bar!">

This would be executed when you press a submit button in your cfform.  You can have multiple validation types in one attribute.

The available validation types are located at http://livedocs.macromedia.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFusion_Documentation&file=00000279.htm

Makes sense?

Teddy



On 9/27/06, Chris C. Cooper <[EMAIL PROTECTED]> wrote:

 

When do you want to validate and what type of cfform are you using?

When the user hits the submit button.

 

This is the cfform..

 

<cfform id="form1" name="form1" method="post" action="">

 

I have another page of this form and the validation works fine.



You want to validate prior to the form submitting or after a submit event?

Most forms work well with a submit validation, but highly recommended with any validation you choose that you then in turn validate yet again on the action page of the form.

Teddy

On 9/27/06, Chris C. Cooper <[EMAIL PROTECTED]> wrote:

Any reason why my CF form validation only work some times? If I change Validateat to On Blur it seems to work. I does work sometimes for some reason so I don't think it's a mapping issue.

 

 

<cfinput  name="user_student_id"

                                     type="text"

                                     id=" user_student_id "

                                     required="yes"

                                     message="Please Enter a Student ID"

                                     value="#getuser.user_student_id#"

                                    />

 

 

 

 


-------------------------------------

Chris C. Cooper

Cooper e.Business Solutions

Atlanta , Georgia
404.691.4816

 

Cooper e.business Solutions – http://www.cooperebusiness.com

 


-------------------------------------------------------------
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by FusionLink
-------------------------------------------------------------




--
<cf_payne />

Blog: http://cfpayne.wordpress.com/

Atlanta CFUG: http://www.acfug.org nNryjj


-------------------------------------------------------------
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by FusionLink
-------------------------------------------------------------




--
<cf_payne />

Blog: http://cfpayne.wordpress.com/
Atlanta CFUG: http://www.acfug.org nN沸yزXfjꮇ檚|ñ


-------------------------------------------------------------
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by FusionLink
-------------------------------------------------------------

Reply via email to