Question
Checkbox question again
I have ten checkboxes, name cb1, cb2..etc, with vaules 1, 2,
etc. I have different names because the technique i use to
redisplay the checkboxes required different names.
Anyways, I insert into my table using cfif isDefined("form.cb1"), etc, for each checkbox and insert the values 1, 2, etc. in to the table if the box is checked, along with a status of Active.
So far so good, but here is the problem that I am haveing :
I bring up the form in edit mode and I display all ten checkboxes, and the ones that were previously checked, I have a checkmark in them (query from the table). For example, checkboxes 1, 5, and 8 were/are checked, so those values are in the table as active and display on the screen with checkmarks.
If they decide to edit and uncheck 5, and uncheck 8 (leave 1 checked) and check 2, 3, and 4, how would I update the table to change the status of 5 and 8 from active to inactive ?
Right now, I just delete all the current entries (1, 5 and 8) and just readd the new ones 1, 2, 3, 4 as active (using primary key).
But I need to keep track of the active and inactive status. How can I do that ?
Can someone please provide some code or examples ?
Thanks
Anyways, I insert into my table using cfif isDefined("form.cb1"), etc, for each checkbox and insert the values 1, 2, etc. in to the table if the box is checked, along with a status of Active.
So far so good, but here is the problem that I am haveing :
I bring up the form in edit mode and I display all ten checkboxes, and the ones that were previously checked, I have a checkmark in them (query from the table). For example, checkboxes 1, 5, and 8 were/are checked, so those values are in the table as active and display on the screen with checkmarks.
If they decide to edit and uncheck 5, and uncheck 8 (leave 1 checked) and check 2, 3, and 4, how would I update the table to change the status of 5 and 8 from active to inactive ?
Right now, I just delete all the current entries (1, 5 and 8) and just readd the new ones 1, 2, 3, 4 as active (using primary key).
But I need to keep track of the active and inactive status. How can I do that ?
Can someone please provide some code or examples ?
Thanks
