Skip to main content
Legend
September 12, 2008
Answered

MX8 IE7 field validation issue

  • September 12, 2008
  • 1 reply
  • 418 views
I'm having a problem with using CFFORM and simple field validation -- by simple, I mean simply setting required="YES" on a CFINPUT field. The JavaScript that CF8 generates is something like:

quote:

if( !_CF_hasValue(_CF_this['CompanyName'], "TEXT", false ) )...


apparently this is invalid in IE7. CF5 generated the above as:

quote:

if( !_CF_hasValue(_CF_this.CompanyName, "TEXT", false ) )...


this is valid in IE7.

Help!
    This topic has been closed for replies.
    Correct answer Steve Sommers
    Nevermind! A naming problem. For some unknow reason, the form name was hardcoded to "CFFORM_1". This creates a naming conflict if there are multiple forms that are unnamed because CF will name the first unnamed form "CFForm_1" -- boom!

    Unfortunately, CF nor JavaScript warns you of this collision. I hope this helps someone else.

    1 reply

    Steve SommersAuthorCorrect answer
    Legend
    September 12, 2008
    Nevermind! A naming problem. For some unknow reason, the form name was hardcoded to "CFFORM_1". This creates a naming conflict if there are multiple forms that are unnamed because CF will name the first unnamed form "CFForm_1" -- boom!

    Unfortunately, CF nor JavaScript warns you of this collision. I hope this helps someone else.