Solved

FLASH FORM/CFINPUT

Posted on 2007-11-15
2
403 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 400 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Application launch issue with Apache Tomcat 5 70
Intranet Solution - Sharepoint Foundation or up 4 67
PHP Register global 21 106
Company website 6 46
Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

749 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