Skip to main content
Inspiring
February 2, 2016
Answered

cfinput required="yes" not working

  • February 2, 2016
  • 1 reply
  • 1026 views

Hello,

my coldfusion application runs in Intranet  and  Internet (https://www.xxx.com/inputform.cfm)

When I open my CF-Page from Internet,  server side validation does not work.

No popup comes to tell that the required form field isn't filled out.

When I run the CF-Page as an internal Intanet application (http://servername/inputform.cfm)

the validation works fine.

Here is an example of an

<cfinput name="catalog" type="text"   required="Yes" message="Catalog is required" >

Is https protocol the reason?

Best regard

Claudia

This topic has been closed for replies.
Correct answer Steve Sommers

Fist guess, the CFIDE virtual directory is not configured for your external site. This directory contains a scripts folder that houses the JS files that the client-side CF validation requires. Next guess would be a JS error is being triggered, preventing the validation. Try running a client side debugging tool like Firebug in Firefox or the IE programmer tools. Either will point out the issue(s) of missing files or JS exceptions.

Lastly, I recommend getting away from using CFFORM, CFINPUT, etc., for client-side validation. Use the native form and input tags and  Incorporate something like jquery validation. It's much more state-of-the-art and gives you much more control over the user experience.

1 reply

Steve SommersCorrect answer
Legend
February 2, 2016

Fist guess, the CFIDE virtual directory is not configured for your external site. This directory contains a scripts folder that houses the JS files that the client-side CF validation requires. Next guess would be a JS error is being triggered, preventing the validation. Try running a client side debugging tool like Firebug in Firefox or the IE programmer tools. Either will point out the issue(s) of missing files or JS exceptions.

Lastly, I recommend getting away from using CFFORM, CFINPUT, etc., for client-side validation. Use the native form and input tags and  Incorporate something like jquery validation. It's much more state-of-the-art and gives you much more control over the user experience.