PCHomepage
Programmer
On a form that I did not create and cannot rewrite, I have managed to extract an array of a sample output but I am not sure how to get what I need from it. What the form does is to remove entries of image names from a table and it is doing so perfectly but I am trying to come up with the code to delete the physical images too. I don't need help in deleting the images - I can do that myself - but I do need help in making sense of the form output!
On one example with two entries, the form (which is an editable grid) is submitting something like this:
In the case above I selected a check box and submitted the form to delete Image-021.jpg but it could have any number of images. The check box numbering is dynamic so CheckBox_Delete_2 is the one for Image-021.jpg so clearly CheckBox_Delete_2 -> 1 is saying that it was the box selected.
Here is an example with both check boxes checked and the form submitted:
. . . and here it is with NO check boxes checked and the form submitted:
The question is, how do I get the file name value from this?
On one example with two entries, the form (which is an editable grid) is submitting something like this:
Code:
FormState -> 2;0;ID;334;332
ImageName_1 -> Image-020.jpg
ImageName_2 -> Image-021.jpg
CheckBox_Delete_2 -> 1
Button_Submit -> Delete Selected
In the case above I selected a check box and submitted the form to delete Image-021.jpg but it could have any number of images. The check box numbering is dynamic so CheckBox_Delete_2 is the one for Image-021.jpg so clearly CheckBox_Delete_2 -> 1 is saying that it was the box selected.
Here is an example with both check boxes checked and the form submitted:
Code:
FormState -> 2;0;ID;334;332
ImageName_1 -> Image-020.jpg
CheckBox_Delete_1 -> 1
ImageName_2 -> Image-021.jpg
CheckBox_Delete_2 -> 1
Button_Submit -> Delete Selected
. . . and here it is with NO check boxes checked and the form submitted:
Code:
FormState -> 2;0;ID;334;332
ImageName_1 -> Image-020.jpg
ImageName_2 -> Image-021.jpg
Button_Submit -> Delete Selected
The question is, how do I get the file name value from this?