Selecting all checkboxes and transferring them to another page with one click of a button

HI,

I have several checkboxes in my report. I use two buttons "Select All" and "Deselect All" to select all checkboxes and deselect all checkboxes. But I am unable to pass the checked values ​​to another report. Only if I manually select the checkboxes, then only those values ​​will be transmitted in the report.

Can anyone help me with this?

0


a source to share


2 answers


I am assuming you select all and deselect all buttons, using javascript to set or unselect all other checkboxes on the form.



Checkboxes

unset are not passed. just installed. If you need to explicitly specify 0 or 1 to pass, you will need to do something like add extra hidden fields, sync with the state of the checkboxes, but that will be riddled with problems (no javascript = FAIL for example).

+1


a source


You can have a bunch of hidden fields to accompany checkboxes and set their values ​​if the checkboxes are not checked.



Alternatively, if you need two or more states for a field, use a radio button.

0


a source







All Articles