My apologies if I worded the title wrong.
I've got a large table with multiple input boxes and need to get the values of the internal cells.
I am able to get the dates, gas amounts/totals, and the totals, but not the rest.
I need still to be able to get every other input box's value.
I am not too sure where to go with this one, but I think you need to two names.
This form is submitted to a pdf where I get the values.
The form code:
<cfloop from="1" to="#ArrayLen(labels)#" index="r">
<tr>
<td class="labels"><cfif ArrayIsDefined(labels,r) AND labels[r] NEQ "Open1">
<cfif labels[r] EQ "Open">
<input type="text" name="descript#r#" class="description" value="Enter text here" style="width:auto;" />
<cfelse>
#labels[r]#
</cfif>
</cfif></td>
<cfloop from="1" to="7" index="i">
<td id="Day#i#" class="row#r# col#i#"><cfif r EQ 1>
#Left(DayOfWeekAsString(i),3)#
<cfelse>
<cfif r EQ 2>
<input type="text" class="date-mask" name="dates#i#" />
<cfelse>
<input type="text"
<cfif labels[r] EQ "Personal Car: Mileage ##"> id="gasamount#i#" <cfelseif labels[r] EQ "Personal Car: Mileage $">id="gasmoney#i#" </cfif><cfif labels[r] EQ "Daily Totals">id="dailytotals#i#"</cfif>
class="<cfif labels[r] EQ "Personal Car: Mileage ##">gasamount<cfelse><cfif labels[r] NEQ "Daily Totals">C#i#</cfif></cfif>
<cfif labels[r] EQ "Personal Car: Mileage $">gasmoney<cfelse>calc R#r#</cfif>
<cfif labels[r] EQ "Daily Totals">ttlC#i#</cfif>"
<cfif labels[r] EQ "Daily Totals" OR labels[r] EQ "Personal Car: Mileage $" OR labels[r] EQ "Open1">readonly="readonly"</cfif>
name="<cfif labels[r] NEQ "Personal Car: Mileage ##" AND labels[r] NEQ "Personal Car: Mileage $" AND labels[r] NEQ "Dates:" AND labels[r] NEQ "Open1" AND labels[r] NEQ "Daily Totals">R#r# C#i#</cfif>
<cfif labels[r] EQ "Personal Car: Mileage ##">gasamt#i#</cfif>
<cfif labels[r] EQ "Daily Totals">celltotals#i#</cfif>
<cfif labels[r] EQ "Personal Car: Mileage $">gastot#i#</cfif>"
/>
</cfif>
</cfif></td>
</cfloop>
<td class="totals"><cfif r EQ 1>
Total
<cfelse>
<input type="text" id="totals" class="ttlR#r#" name="totals#r#" readonly="readonly" />
</cfif></td>
</tr>
</cfloop>
And the PDF Code:
<cfloop from="1" to="#ArrayLen(labels)#" index="r">
<tr>
<td class="labels"><cfif ArrayIsDefined(labels,r) AND labels[r] NEQ "Open1">
<cfif labels[r] EQ "Open">
<span>#form['descript' & r]#</span>
<cfelse>
#labels[r]#
</cfif>
</cfif></td>
<cfloop from="1" to="7" index="i">
<td id="Day" class="row#r# col#i#"><cfif r EQ 1>
#Left(DayOfWeekAsString(i),3)#
<cfelse>
<cfif labels[r] EQ "Date:">
<span style="width:60px;">#form['dates' & i]#</span>
<cfelse>
<span style="width:60px;">
<cfif labels[r] EQ "Personal Car: Mileage ##">
#form[" " & 'gasamt' & i & " "]#
</cfif>
<cfif labels[r] EQ "Personal Car: Mileage $">
#form[" " & 'gastot' & i]#
</cfif>
<cfif labels[r] EQ "Daily Totals">
#form[" " & 'celltotals' & i & " "]#
</cfif>
<cfif labels[r] NEQ "Personal Car: Mileage ##" AND labels[r] NEQ "Personal Car: Mileage ##" AND labels[r] NEQ "Dates:" AND labels[r] NEQ "Open1" AND labels[r] NEQ "Daily Totals">
#form['R' & r & " "]#
</cfif>
</cfif>
</cfif>
</span></td>
</cfloop>
<td class="totals" style="width: 60px;"><cfif r EQ 1>
Total
<cfelse>
<span style="text-align:right;">#form['R' & r & " " & 'C' & i & " "]#</span>
</cfif></td>
</tr>
</cfloop>
I've added spaces in those objects because the names all seem to have spaces in different places, yet there is none in the code.
I have an error when you submit the page at the moment because of how I'm trying to reference the form elements.
Thanks in advance for anytime you spend trying to help out.