isNumeric("form.num") will always evaluate to 0 (and not 4). It's a literal string (by virtue of the fact that it's enclosed in quotes). So this condition will never be true.
What you want is isNumeric(form.num). Which will return true or false. So when you say isNumeric(form.num) eq 4... I'm not sure that's what you want. ColdFusion will accept that... it uses implicit boolean conversion so true == 4 is true. But that's not really what you're going for, I don't think. try: <cfif structKeyExists(form, 'num') and val(form.num) eq 4> On Fri, Sep 25, 2009 at 1:03 PM, Steve LaBadie <slaba...@po-box.esu.edu>wrote: > > I am trying to checked that a specific number is entered into a form > field. I am able stop the form from executing, but can't get the form to > submit with the correct number. Any guidance would be appreciated. > > > > <cfif IsDefined("form.num") AND form.num NEQ "" AND > IsNumeric("form.num") EQ 4> > > <cfelse> > > <cflocation url="cms_test.cfm"> > > </cfif> > > > > Thanks > > > > Steve LaBadie, Web Manager > > East Stroudsburg University > > 200 Prospect St. > > East Stroudsburg, Pa 18301 > > 570-422-3999 > > http://www.esu.edu <http://www.esu.edu> > > slaba...@po-box.esu.edu <mailto:slaba...@po-box.esu.edu> > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326638 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4