Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

FLASH FORM/CFINPUT

Posted on 2007-11-15
2
Medium Priority
?
408 Views
Last Modified: 2013-12-24
I didn't get any responses on this question except an email telling me I didn't get any responses and I must have not worded the question correctly or I put it in the wrong zone...well I read the question over and I don't see how i could have been more explicit on what I was asking and I put it in the confusion zone because that is where I am building.  So I'm not sure what else to put here...so here is still my question, please.

Is there a way to validate a field in a flash form within cfinput that states the user MUST have entered exactly 6 characters in the field.  The field is alpha numeric so it's not like i can use a range and i have the maxlength attribute attached but that just keeps the end user from entering more than 6 characters but allows them to add less than 6 (but we can't have that).  Here is the code I am using for the cfinput field:
<CFINPUT name="strField01"
       label="User ID:"
      width="200"
      align="left"
      mask="AA999X"
      maxlength="6"
      required="yes"
      validate="noblanks,maxlength"
      message="You must enter the users ID and in the proper format XX9999 or XX999X.">
0
Comment
Question by:Lee R Liddick Jr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 9

Accepted Solution

by:
73Spyder earned 1600 total points
ID: 20422585
I've not used flash forms much but here is solution I stumbled across.  Perhaps it will help.
http://photos.sys-con.com/story/res/42052/source.html
Listing 1
<script language="JavaScript">
function validatePassword(form,field,value) {
if (value.length < 6) {
return 0;
}
else {
return 1;
}
}
 
</script>
 
<cfform name="form1">
<table>
<tr>
<td>Password:</td>
<td><cfinput type="Password" name="pw"
message="Please enter a password of at least 6 letters"
onvalidate="validatePassword"></td>
</tr>
<tr>
<td>Text:</td>
<td><TEXTAREA name="address" rows="3" cols="26"></TEXTAREA>
<!-- <CFINPUT name="address" required="yes"
message="Please enter some text"> -->
</td>
</tr>
 
<tr>
<td>&nbsp;</td>
<td><input type="submit" value="Check"></td>
</tr>
</table>
</cfform>

Open in new window

0
 

Author Closing Comment

by:Lee R Liddick Jr
ID: 31417178
I forgot this was still open as I went a different route.  I will try this when I get a chance but will provide you with the points since nobody else had responded.  I thank you for your help and pointing me in the right direction to assist in my question.  Thanks again...
0

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question