• Resolved itexilion

    (@itexilion)


    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

    (@itexilion)

    and with .click() it just focuses on checkbox, but doesn’t check it

    Plugin Author codepeople

    (@codepeople)

    Hello @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

    (@itexilion)

    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.