Skip to content

Commit 2bd6e83

Browse files
authored
gw-choice-counter.php: Fixed an issue with the choice counter counting disabled checkboxes.
1 parent 9db39a3 commit 2bd6e83

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gravity-forms/gw-choice-counter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ function output_script() {
124124
if ( ! values ) {
125125
// If no values provided in the config, just get the number of checkboxes checked.
126126
if ( self.isCheckableField( $choiceField ) ) {
127-
count += $choiceField.find( ':checked' ).not(' #choice_' + choiceFieldIds[ i ] + '_select_all').length;
127+
count += $choiceField.find( ':checked' ).not(':disabled').not(' #choice_' + choiceFieldIds[ i ] + '_select_all').length;
128128
} else {
129129
count += $choiceField.find( 'option:selected' ).length;
130130
}

0 commit comments

Comments
 (0)