I have a form, and I’ve setup a serverside validation using ftValidatefieldname
. All works well and the form returns with the error and it’s all highlighted in pink as it should be.
The problem is, as soon as you unfocus on the field jquery.validate
hides the <div CLASS="ctrlHolder inlineLabels string error">
and doesn’t just remove the class of ‘error’. It’s like on that field it’s using it’s default behaviour and not the custom farcry one. This behavior hides everything in that element eg label and input.
Looks like I’ve found the issue. In object.cfm
there needs to be a DIV
wrapper around the error message. Other wise the validate script goes to hide the wrapper and finds the ctrHolder
and hides that.
So line 511 of object.cfm
needs to go from this:
<cfoutput>#variables.formValidationMessage#</cfoutput>
to this
<cfoutput><div>#variables.formValidationMessage#</div></cfoutput>
h/t Phillip Rasmussen