I have no idea what you are asking for. I can tell you, however, that if there is more than one record returned (which makes more than one iteration for CFOUTPUT) you will have more than one form with the same name. Each form would have to have a unique name/id.
Probably best to have the form tags outside of the cfoutput (making one form for the page) with one submit button. In this case, if the checkboxes have the same name they will become (upon form submit) an object that can be treated as an array or list (ie, if you have three records and the checkbox values are 1, 2, and 3, they become "1,2,3" when the form is submit.)
__________________ ^_^
If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
* The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".
I have no idea what you are asking for. I can tell you, however, that if there is more than one record returned (which makes more than one iteration for CFOUTPUT) you will have more than one form with the same name. Each form would have to have a unique name/id.
Probably best to have the form tags outside of the cfoutput (making one form for the page) with one submit button. In this case, if the checkboxes have the same name they will become (upon form submit) an object that can be treated as an array or list (ie, if you have three records and the checkbox values are 1, 2, and 3, they become "1,2,3" when the form is submit.)
But if I have a link / image that I want to run the update on the record that the check boxes are selected.
Check boxes are there only because I have to specify which post I want to update
but if I put checkbox value="#recTest.AlbID#"
so it should be possible to create the link (url: uppdate.cfm?ID=(value checkbox)
Last edited by theborg72; 06-04-2012 at 09:19 AM..
It would be (IMHO) better and more efficient if you have only one form, submit the list of ID's to the processing page, and iterate through the list for processing. Several forms on the same page is overkill, and the link doesn't really "submit" the form, rather it just redirects to a new page with a URL parameter. So why have a form, at all?
__________________ ^_^
If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
* The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".
With each record having its own form, you will only be able to delete one at a time; with one form, you can delete many at once.
As your code already shows, the link would be good for editing, since you only need to edit one record at a time, so now I understand that part.
__________________ ^_^
If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
* The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".
You don't need a checkbox or a form, for that. The link that you have already will do that. The checkbox (in a single form, not one for each) will allow multiple deletes. If you don't want the option of deleting more than one at a time, the form is pretty much useless.
If you insist on having one form for each record, then you need to do something to give each form a unique name and ID; like appending the currentRow to each. That will give each form a unique name and ID. But, again, this will only allow for one delete at a time. Kind of annoying if you have to delete ten or more, to do them one at a time.
__________________ ^_^
If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
* The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".
Last edited by WolfShade; 06-04-2012 at 02:31 PM..
You don't need a checkbox or a form, for that. The link that you have already will do that. The checkbox (in a single form, not one for each) will allow multiple deletes. If you don't want the option of deleting more than one at a time, the form is pretty much useless.
If you insist on having one form for each record, then you need to do something to give each form a unique name and ID; like appending the currentRow to each. That will give each form a unique name and ID. But, again, this will only allow for one delete at a time. Kind of annoying if you have to delete ten or more, to do them one at a time.
I have a primary key in the database that gives it a unique name. That it only goes with one record at a time is the point. do not want to have one of each but only one that goes to everything.