Question
I do not know or understand how to do this -
Since I am not a programmer and have very limited knowledge
of coldfusion, I post here for help and can sometimes figure things
out. But this time, I am stuck and really do not understand any of
the suggestions from my original post. So I am posting again,
hoping somebody can help me out and show me how to do this.
I use the following code to display all line items from a query, and put in checkboxes for each line item, so that if the box is checked, that line item will be deleted, if all boxes are checekd, all line items are deleted.
<cfoutput query="qry">
<tr>
<td align="center"><input type="checkbox" name="del_#red_number#_#ref_line_item#" value="Yes"></td>
<td align="center">#qry.line_item#</td>
<td align="center">#qry.action#</td>
<td align="center">#qry.quantity#</td>
the action page :
<cfloop index="i" list="#form.fieldnames#" delimiters=",">
<cfif left(i,4) is "del_">
<cfset select_ref_number = listgetat(i, 2, "_")>
<cfset select_ref_line_item = listlast(i, "_")>
processing here, works fine.
What I need to do now is add an extra/new input text field, to each line item displayed, for the user to enter comments explaining why they want to delete that line item. I then need to insert this comment that corresonds to each line item into another table, along with the displayed fields from the query.
Since this comments input text is not part of the query, how do I associate it with each line item/record, when it is inserted into another table ?
Can somebody please show me how to set thit up ?
Thanks in advance for any help.
I use the following code to display all line items from a query, and put in checkboxes for each line item, so that if the box is checked, that line item will be deleted, if all boxes are checekd, all line items are deleted.
<cfoutput query="qry">
<tr>
<td align="center"><input type="checkbox" name="del_#red_number#_#ref_line_item#" value="Yes"></td>
<td align="center">#qry.line_item#</td>
<td align="center">#qry.action#</td>
<td align="center">#qry.quantity#</td>
the action page :
<cfloop index="i" list="#form.fieldnames#" delimiters=",">
<cfif left(i,4) is "del_">
<cfset select_ref_number = listgetat(i, 2, "_")>
<cfset select_ref_line_item = listlast(i, "_")>
processing here, works fine.
What I need to do now is add an extra/new input text field, to each line item displayed, for the user to enter comments explaining why they want to delete that line item. I then need to insert this comment that corresonds to each line item into another table, along with the displayed fields from the query.
Since this comments input text is not part of the query, how do I associate it with each line item/record, when it is inserted into another table ?
Can somebody please show me how to set thit up ?
Thanks in advance for any help.
