Hello all,
I'm having a strange problem with all of my pages that are using cfform. On most of my cfforms I have used cfinput fields to require that a user enter text for their first name, last name, etc.
These forms used to work just fine. Now, however, I'm noticing that if I don't enter anything in these cfinput fields and click the submit button it's taking me to the action page without requiring data in those fields.
For example, my code is:
<cfinput type="text" size="45" name="FirstName" required="yes" Message="Please enter your first name.">
You would think that cfinput not allow the form to submit until data is entered but it's just not catching it.
I've even tried to convert cfforms to regular forms and use a javascript to catch it but it's not working either.
<script language="JavaScript" type="text/javascript">
<!--
function checkform ( form )
{
// ** START **
if (form.FirstName.value == "" {
alert( "Please enter a subject for your message" );
form.FirstName.focus();
return false ;
}
</cfif>
// ** END **
return true ;
}
//-->
</script>
Any ideas?
By the way, I'm using a Windows 2000 server running ColdFusion MX and SQL Server 2000.
Mike
I'm having a strange problem with all of my pages that are using cfform. On most of my cfforms I have used cfinput fields to require that a user enter text for their first name, last name, etc.
These forms used to work just fine. Now, however, I'm noticing that if I don't enter anything in these cfinput fields and click the submit button it's taking me to the action page without requiring data in those fields.
For example, my code is:
<cfinput type="text" size="45" name="FirstName" required="yes" Message="Please enter your first name.">
You would think that cfinput not allow the form to submit until data is entered but it's just not catching it.
I've even tried to convert cfforms to regular forms and use a javascript to catch it but it's not working either.
<script language="JavaScript" type="text/javascript">
<!--
function checkform ( form )
{
// ** START **
if (form.FirstName.value == "" {
alert( "Please enter a subject for your message" );
form.FirstName.focus();
return false ;
}
</cfif>
// ** END **
return true ;
}
//-->
</script>
Any ideas?
By the way, I'm using a Windows 2000 server running ColdFusion MX and SQL Server 2000.
Mike