Did you want this action for only one of the forms on the page?
If not, perhaps just have the default setting to be checked or unchecked; then reload the page when you want the checkboxes to return to their default state.
Alternately, you might have to write a custom function that checks or unchecks the particular form you want affected.