Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Hiding form using check box

Avatar

Level 1

Hi all,

Can anyone help me how to hide and unhide a form depends on checkbox selection. 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@kamalams6577372 

Try the below snippet.

$(document).on("change", "./checkbox-name", function(e) {
    if($(this).prop("checked")) {
        // Logic Checked
    } else {
        // Logic un checked
    }
});

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

@kamalams6577372 

Try the below snippet.

$(document).on("change", "./checkbox-name", function(e) {
    if($(this).prop("checked")) {
        // Logic Checked
    } else {
        // Logic un checked
    }
});