Skip to main content
Participant
September 25, 2013
Question

cfform with cfinput validation producing different error messages

  • September 25, 2013
  • 1 reply
  • 394 views

I have a cfm that is using cfform and cfinput.  There are 7 text fields and one checkbox.  The 7 fields are all required and the checkbox must be checked. Sometimes the javascript behaves differently.  Sometimes I get an individual alert for each field that is blank and if the checkbox is not checked. 

Most times, the error messages for the fields are grouped and displayed in a single alert.  From the looks of the java script that is generated by cold fusion, it should always group the error messages and display them in a single alert.

On the occasions when I get the individual alerts popping up, the validation on the checkbox also does not work.  The validation fails whether the checkbox is checked or not.

Tests were conducted in IE9 and Firefox 24 on Windows 7.

Any idea why the java script would work differently?  Is it possible there is an old version of CF that is being picked up sometimes?

This topic has been closed for replies.

1 reply

Participating Frequently
September 25, 2013

Which version of ColdFusion are you using?  Regardless, you're better of these days ditching cfinput and cfform if possible, and writing your own Javascript (or using a proper JS framework).