Thank you very much. I wanted to avoid rolling my own validation for some 30
fields. Sometimes CF makes me lazy... errr... I mean productive.

G!

On Thu, Mar 5, 2009 at 11:11 PM, Azadi Saryev <[email protected]> wrote:

>
> when you use cfform, cf automatically creates a js function named
> _CF_Check[your cfform's NAME attribute value] to validate your form, and
> adds the onsubmit attribute to the form tag.  i guess it overwrites any
> onsubmit you put in the tag while doing this...
> one way i managed to have custom validation work with cfform is to NOT
> use a SUBMIT button, but a regular button that fires off a custom
> validation js function and calls submit() at the end if the form validates.
> if you ALSO want to use cf's built-in validation alongside your custom
> validation, just call the _CF_Check[you form's name] function at the end
> of your custom validation function - iirc the cf's autogenerated js
> validation already includes the submit() part...
>
> Azadi Saryev
> Sabai-dee.com
> http://www.sabai-dee.com/
>
>
>
> Gerald Guido wrote:
> > Anyone seen this before?
> >
> > On Thu, Mar 5, 2009 at 12:04 PM, Gerald Guido <[email protected]
> >wrote:
> >
> >
> >> I have some custom validation code that I want to include using onsubmit
> on
> >> CFForm and the validation function is not being called
> >>
> >> I am calling it like this
> >> <cfform action="#script_name#" method="post" enablecab="no"
> name="Myform"
> >> onsubmit="return(checkForm(this) && false);">
> >>
> >> But the rendered HTML looks like this.
> >>
> >> <form name="Myform" action="/OKGEARUP/EventAdmin/events.cfm"
> method="post"
> >> onsubmit="return _CF_checkMyform(this)">
> >>
> >> This is the first time I mixed regular JS with CFform. I RTFM and I am
> not
> >> seeing anything about problems with Mix and match
> >>
> >> Am I missing something here?
> >>
> >> As always TIA.
> >>
> >> G!
> >> --
> >> Gerald Guido
> >> http://www.myinternetisbroken.com
> >>
> >>
> >> "To invent, you need a good imagination and a pile of junk."
> >> -- Thomas A. Edison
> >>
> >>
> >>
> >>
> >
> >
> >
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320161
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to