Solved

FLASH FORM/CFINPUT

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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

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…
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…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now