Advertisement

01.12.2008 at 05:37AM PST, ID: 23077866
[x]
Attachment Details

CFFORM Input tag onkeyup event

Asked by john_hollings in ColdFusion Studio, Macromedia Dreamweaver

Tags: ColdFusion, CF 7

Hi,
I have a cfform that contains cfinput tags, one of these asks for a number to be entered (places) I would like the form to dynamicy populate new input tags e.g Name for the number of time as to the entere places.

I think that it could be done through an event 'OnKeyUp' but I can not get this to work
Can any help?

I have attached a code Snippet with some comments.Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
<head>
 
</head>
<body>
 
<cfparam name="form.places" default="4">
 
<cfform action="results.cfm" method="post" preservedata="yes">
	<table>
		<tr valign="middle">
		<td height="40" colspan="2" align="left" valign="top" class="body">
			E Mail Address:<br>
			<cfinput type="text" name="email" message="Email address required" required="yes" tabindex="10" size="45" maxlength="255">
		</td>
		
		<td valign="top">Please book <span class="style1">*</span><br>
			<cfinput type="text" name="places" size="4" maxlength="2" >&nbsp;place(s)
		</td>
		</tr>
	
<!--- When a user enters a number for plases in the above field I heed the following code to run the show the number ofoptions as entered the places input option  --->		
<!--- If I set the '<cfparam name="form.places" default="1">' to a say 4 I get the resualt I need, but this needs to be Dynamic on users input  --->
 
	<cfset j = #form.places#>
	<cfloop index = "LoopCount" from = "1" to = #j#>
	  <tr valign="middle">
		<td height="40" colspan="2" align="left" valign="top" class="body"> Delagates Name <cfoutput>#LoopCount#</cfoutput>: <br>
			  <cfinput type="text" name="delName" message="Email delagates name" required="yes" tabindex="10" size="45" maxlength="255">
		</td>
		<td valign="top">Delagates Bate of Birth <cfoutput>#LoopCount#</cfoutput>: <br>
			  <cfinput type="text" name="deldob" message="Email delagates Date of birth" required="yes" tabindex="10" size="45" maxlength="255" validate="date">
		</td>
	  </tr>
	</cfloop>
	</table>
</cfform>
</body>
[+][-]01.12.2008 at 06:31AM PST, ID: 20643869

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.12.2008 at 10:08AM PST, ID: 20644749

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.12.2008 at 10:23AM PST, ID: 20644783

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.12.2008 at 10:24AM PST, ID: 20644794

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.13.2008 at 05:53AM PST, ID: 20647649

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.13.2008 at 06:40AM PST, ID: 20647779

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: ColdFusion Studio, Macromedia Dreamweaver
Tags: ColdFusion, CF 7
Sign Up Now!
Solution Provided By: _agx_
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628