Solved

FLASH FORM/CFINPUT

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Running Guacamole on port 80 5 207
Intranet Solution - Sharepoint Foundation or up 4 65
wordpress limitations 4 114
SSL sertificate 5 65
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

808 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