Skip to main content
Known Participant
July 10, 2006
Question

cfform not working

  • July 10, 2006
  • 1 reply
  • 275 views
EDIT > I have just noticed that none of my cfform required attributes work, they work on my local machine but not on my hosting companys, any ideas?



Hi i have this form below which i need a message to popup if the value is less than 10000 is my code correct? as the form submits without stopping the user

also i need this same form in another area but it need to be a hidden value how would i do this?

This topic has been closed for replies.

1 reply

LaoD
Known Participant
July 10, 2006
Setting "REQUIRED" to yes and validate to "INTEGER" should do the trick.

<cfinput type="Text" name="TotalCost" value="#GetTotal.Total#" range="1,10000" message="PLEASE CHANGE YOUR TEAM \n\n Total Cost Must Be Less Than $10,000" required="yes" validate="integer">

For the hidden value, if you are passing this input value to the next form, you would just add <cfinput type="HIDDEN" Name="TotalCost" Value="#FORM.Total#>. If you are passing this hidden value from some place other than this form, then change FORM.Total to whatever you are passing from, e.g. URL instead of FORM.