Skip to content

Commit

Permalink
gw-choice-counter.php: Fixed an issue with the choice counter count…
Browse files Browse the repository at this point in the history
…ing disabled checkboxes.
  • Loading branch information
saifsultanc authored Jan 23, 2025
1 parent 9db39a3 commit 2bd6e83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gravity-forms/gw-choice-counter.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ function output_script() {
if ( ! values ) {
// If no values provided in the config, just get the number of checkboxes checked.
if ( self.isCheckableField( $choiceField ) ) {
count += $choiceField.find( ':checked' ).not(' #choice_' + choiceFieldIds[ i ] + '_select_all').length;
count += $choiceField.find( ':checked' ).not(':disabled').not(' #choice_' + choiceFieldIds[ i ] + '_select_all').length;
} else {
count += $choiceField.find( 'option:selected' ).length;
}
Expand Down

0 comments on commit 2bd6e83

Please sign in to comment.