Skip to content

Commit 04ba3ab

Browse files
authored
gw-conditionally-disable-checkboxes.js: Updated to ignore checkboxes disabled by Limit Checkboxes.
1 parent 4062f64 commit 04ba3ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gravity-forms/gw-conditionally-disable-checkboxes.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ $cbs2.on( 'change', function() {
4141
function gwDisableCheckboxes( $triggerField, $targetField, exclusions ) {
4242

4343
var checkedValues = [];
44-
$.each( $triggerField.find( 'input:checked' ), function() {
44+
$.each( $triggerField.find( 'input:checked:not( .gplc-disabled )' ), function() {
4545
checkedValues.push( $(this).val() );
4646
} );
4747

48-
var $targetCheckboxes = $targetField.find( 'input[type="checkbox"]' );
48+
var $targetCheckboxes = $targetField.find( 'input[type="checkbox"]:not( .gplc-disabled )' );
4949
$targetCheckboxes.prop( 'disabled', false );
5050

5151
for ( const [ key, value ] of Object.entries( exclusions ) ) {

0 commit comments

Comments
 (0)