|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
client-side validation
I use this code:
<cfform action="./addstudent.cfm" method="post" name="form1" id="form1" target="_blank"> <table width="100%" border="0" cellpadding="5"> <tr> <td class="right">first name </td> <td><cfinput name="firstName" type="text" id="firstName" size="30" maxlength="50" required="yes" message="Please enter your first name."></td> </tr> .... plus several other required fields. on submit of a blank record, no messages are returned and the record gets added to the db anyway. Any clues? |
|
#2
|
|||
|
|||
|
Not sure as I don't use the built in validation. You can always specify your own using the onValidate attribute, or specify a custom regex in the validate attribute. Or just switch to a standard form and use your own Javascript...there are tons of free scripts out there for validation and you'll have a lot more control.
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian. How to Post a Question in the Forums |
|
#3
|
|||
|
|||
|
I just copied your code and added a submit button and it worked fine. Are you submitting the information using a submit button or javascript code or something else?
Here's what I added at the bottom to submit the form: <tr> <td align="left" valign="top" colspan="2"><input type="submit" value="submit" name="submitBTN"></td> </tr> </cfform> There maybe something in the code further down that is causing a problem. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > client-side validation |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|