date error
The value "#DateFormat(CTDate)#" could not be converted to a date.
Why it happen when submit form?
Ok, this is my form
<FORM action="action.cfm" method="post">
<input type="hidden" name="CTDate" value="#DateFormat(now(), 'mm/dd/yyyy')#">
<input type="text" name="Name" value=""> - First Name<BR>
<input type="text" name="Occupation" value=""> - Occupation<BR>
<input type="text" name="Email" value=""> - Email<BR>
<textarea name="Comments" rows="7" cols="40"></textarea><BR>
<font size="1" face="verdana">Additional Message</font>
<input type="submit" name="Submit" value="Submit">
</FORM>
and this is my action.cfm
<HTML>
<HEAD>
<CFOUTPUT>
<TITLE>Thank you #Name# for your submission!</TITLE>
</CFOUTPUT>
</HEAD>
<BODY>
<!--- First let's insert this data into our database for safe keeping and later usage. --->
<CFINSERT datasource="myDSN" tablename="tblWebUser" formfields="Name, Occupation, Email, Comments, CTDate">
<!--- Now let's send a copy of this submission by email to ourselves --->
<CFMAIL from="#form.Email#" to="myemail" subject="Submission from website!" server="xxx.x.x.x" port="25">
There has been a form submission on your site, here's what they had to say:
Sender name: #form.Name#
Sender email: #form.Email#
Sender IP: #REMOTE_ADDR#
Message: #Comments#
Message Sent: #DateFormat(now(), 'mmmm dd, yyyy')# #TimeFormat(Now(), 'hh:mm:ss tt')#
</CFMAIL>
Comments
date error
You must me logged in to write a comment.