Title: Resetting Checkboxes
Last modified: January 20, 2020

---

# Resetting Checkboxes

 *  Resolved [marcus22](https://wordpress.org/support/users/marcus22/)
 * (@marcus22)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/resetting-checkboxes/)
 * Hi,
 * I’m currently having an issue with unchecking checkboxes with some jQuery using
   the following code:
 * jQuery(document).on(‘click’, ‘[id*=”fieldname197_”]’, function(){
    jQuery(‘[class*
   =”discount-33″]’).prop(“disabled”, false); jQuery(‘[class*=”discount-50″]’).prop(“
   disabled”, true); jQuery(‘[class*=”discount-33″]:checked’).prop(“checked”, false);
   jQuery(‘[class*=”discount-50″]:checked’).prop(“checked”, false); })
 * When I click on the button (fieldname197) it does untick the relevant checkboxes(
   which have a single option/value) but the value is still being called in a calculated
   field. When I manually untick the checkbox the value does not apply.
 * Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/resetting-checkboxes/#post-12344040)
 * Hello [@marcus22](https://wordpress.org/support/users/marcus22/)
 * If the class names: discount-33 and discount-50 are assigned to fields in the
   form, a field is composed of multiple components: the label, the input field 
   and the instructions for users, so, the correct would be something similar to:
 *     ```
       jQuery(document).on('click', '[id*="fieldname197_"]', function () {
           jQuery('[class*="discount-33"] input').prop("disabled", false);
           jQuery('[class*="discount-50"] input').prop("disabled", true);
           jQuery('[class*="discount-33"] input:checked').prop("checked", false);
           jQuery('[class*="discount-50"] input:checked').prop("checked", false);
       });
       ```
   
 * Please, for additional questions, indicate the URL to the page where the form
   is inserted for checking it in action.
 * Best regards.
 *  Thread Starter [marcus22](https://wordpress.org/support/users/marcus22/)
 * (@marcus22)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/resetting-checkboxes/#post-12344285)
 * Thanks for the quick reply!
 * Afraid that didn’t work, I’ve actually inserted those classes via jQuery.
 * Do you have an email I could send you a link on?
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/resetting-checkboxes/#post-12344748)
 * Hello [@marcus22](https://wordpress.org/support/users/marcus22/)
 * You can contact me directly through my private website: [https://cff.dwbooster.com/contact-us](https://cff.dwbooster.com/contact-us)
 * Best regards.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Resetting Checkboxes’ is closed to new replies.

 * ![](https://ps.w.org/calculated-fields-form/assets/icon-256x256.jpg?rev=1734377)
 * [Calculated Fields Form](https://wordpress.org/plugins/calculated-fields-form/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/calculated-fields-form/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/calculated-fields-form/)
 * [Active Topics](https://wordpress.org/support/plugin/calculated-fields-form/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/calculated-fields-form/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/calculated-fields-form/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [codepeople](https://wordpress.org/support/users/codepeople/)
 * Last activity: [6 years, 2 months ago](https://wordpress.org/support/topic/resetting-checkboxes/#post-12344748)
 * Status: resolved