Skip to main content
March 18, 2009
Question

Form Update Queston

  • March 18, 2009
  • 2 replies
  • 742 views
I'm building a form that sends info to a database.
The form can be submitted if the field DateHRReceived is Null or has a date.
However, If DateHRReceived is a date in the database, it cannot be updated to Null.
It should give an error message on submit.
I'm new, so I'm not sure what I need to do.
Thanks!

This topic has been closed for replies.

2 replies

Participating Frequently
March 20, 2009
You could store the date coming from select query in a hidden field also, and on submit you could preform both client side and server side validations and can show specific error messages.
Aaron_West
Participant
March 19, 2009
You could perform some client-side validation checks using JavaScript. I'd also recommend performing server-side validation with ColdFusion. There are a ton of JavaScript libraries that can help you wire up the validation or you can "roll your own" validation function that ensures the form input values are what they need to be.

ColdFusion also has additional attributes to the CFINPUT tag that will essentially cause JavaScript to be written to the document <head> that does your client-side validation for you.

More info on the different attributes of the CFINPUT tag are here:
http://cfquickdocs.com/#cfinput