Reputation: 907
How can I set a value of a check box after submit?
I clicked the check box and when I click in the submit button, it deselects.
Upvotes: 0
Views: 5904
Reputation: 132580
Having looked at the example you linked to in a comment above, I think your checkbox item is not set up correctly. Looking at the URL in the browser after checking the checkbox and pressing the Apply button I see:
http://apex.oracle.com/pls/apex/f?p=17236:555:3681260444833458::NO::P555_CHECK:
That explicitly sets the values of the checkbox item to NULL, which is normally the unchecked value. As an experiment I changed the URL to:
http://apex.oracle.com/pls/apex/f?p=17236:555:3681260444833458::NO::P555_CHECK:Y
The page reloaded with two checkboxes!:
So how is your checkbox item defined? It should be defined something like this:
i.e.
Also, you don't want to reset P555_CHECK to null in the page branch.
Upvotes: 1