Title: jQuery checkbox .prop(&#8216;checked&#8217;, true);
Last modified: December 13, 2021

---

# jQuery checkbox .prop(‘checked’, true);

 *  Resolved [itexilion](https://wordpress.org/support/users/itexilion/)
 * (@itexilion)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/jquery-checkbox-propchecked-true/)
 * Hello again, i’m trying now to check a checkbox if clicked on other element(fieldset
   legend)
    found a necessary element and with .prop(‘checked’, true); it gets checked(
   visualy), but it does not activate event – adding to summary field. Is there 
   any special syntaxes to check a box in CFF?

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

 *  Thread Starter [itexilion](https://wordpress.org/support/users/itexilion/)
 * (@itexilion)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/jquery-checkbox-propchecked-true/#post-15158921)
 * and with .click() it just focuses on checkbox, but doesn’t check it
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/jquery-checkbox-propchecked-true/#post-15159051)
 * Hello [@itexilion](https://wordpress.org/support/users/itexilion/)
 * If you want to check all checkboxes into a fieldset field by clicking on its 
   legend, you can insert an “HTML Content” field in the form with the following
   piece of code as its content:
 *     ```
       <script>
       jQuery(document).on('click', '.cff-container-field legend', function(){
       jQuery(this).closest('.cff-container-field').find('[type="checkbox"]').prop('checked', true).change();
       });
       </script>
       ```
   
 * Best regards.
 *  Thread Starter [itexilion](https://wordpress.org/support/users/itexilion/)
 * (@itexilion)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/jquery-checkbox-propchecked-true/#post-15159119)
 * Perfect as always)
    Thank you!

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

 The topic ‘jQuery checkbox .prop(‘checked’, true);’ is closed to new replies.

 * ![](https://ps.w.org/calculated-fields-form/assets/icon-256x256.jpg?rev=1734377)
 * [Calculated Fields Form - AI Form Builder for WordPress - Contact, Payment, Quote, Quiz & More](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: [itexilion](https://wordpress.org/support/users/itexilion/)
 * Last activity: [4 years, 10 months ago](https://wordpress.org/support/topic/jquery-checkbox-propchecked-true/#post-15159119)
 * Status: resolved