JohnLucania
asked on
cfquery with cfloop and $0
I have:
<CFLOOP index="per" From="1" To="#TimeIntervals#">
<CFIF per EQ 1><tr id="refRow"><CFELSE><tr></ CFIF>
<CFSET txtPerDate = DateFormat(DateAdd(TimeSpa n,per*Time Offset,sta rtdate) ,"MM/DD/YYYY")>
<cfoutput>
<td>Gift Amount</td>
<td>
<input type="text" name="GA#per#" length="10" maxlength="10" value="#txtPerAmt#" onBlur="AddGA(this.form);" >
</td>
<td>
Pledge Start Date
</td>
<td>
<input type="text" name="PD#per#" length="10" maxlength="10" value="#txtPerDate#" onChange="formatDate(this) ;">
</td>
</cfoutput>
</tr>
</CFLOOP>
The values need to be inserted onto the fields:
[installAmount] [float]
[installDate] [datetime]
on a table.
Of course, there are other fields, but those will be repeated with the same values.
The only fields that will have different values are:
[installAmount] [float]
[installDate] [datetime]
Often, <input type="text" name="GA#per#" length="10" maxlength="10" value="#txtPerAmt#" onBlur="AddGA(this.form);" > can have $0, then I want to skip the specific data entry on cfquery.
<CFLOOP index="per" From="1" To="#TimeIntervals#">
<CFIF per EQ 1><tr id="refRow"><CFELSE><tr></
<CFSET txtPerDate = DateFormat(DateAdd(TimeSpa
<cfoutput>
<td>Gift Amount</td>
<td>
<input type="text" name="GA#per#" length="10" maxlength="10" value="#txtPerAmt#" onBlur="AddGA(this.form);"
</td>
<td>
Pledge Start Date
</td>
<td>
<input type="text" name="PD#per#" length="10" maxlength="10" value="#txtPerDate#" onChange="formatDate(this)
</td>
</cfoutput>
</tr>
</CFLOOP>
The values need to be inserted onto the fields:
[installAmount] [float]
[installDate] [datetime]
on a table.
Of course, there are other fields, but those will be repeated with the same values.
The only fields that will have different values are:
[installAmount] [float]
[installDate] [datetime]
Often, <input type="text" name="GA#per#" length="10" maxlength="10" value="#txtPerAmt#" onBlur="AddGA(this.form);"
ASKER
Can you elaborate more with cfloop?
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
great!
Can you please look at Q_21787408.html?
Can you please look at Q_21787408.html?
Do insert
<cfelse>
Skip this one since it is $0
</cfif>