Skip to content

Commit

Permalink
gw-choice-counter.php: Fixed an issue with Multi Select field not w…
Browse files Browse the repository at this point in the history
…orking on the same choice field ids.
  • Loading branch information
saifsultanc authored Dec 19, 2023
1 parent 17c9edd commit 978681a
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 @@ -74,7 +74,7 @@ function output_script() {
$parentForm = $choiceField.parents('form');

// Do not disable previous select event for multi-select because we may have multiple instances on same choice fields.
if ( $choiceField.attr('multiple') !== 'multiple' ) {
if ( $choiceField.attr('multiple') !== 'multiple' && !Boolean( $choiceField.find(':checkbox').length ) ) {
$parentForm.off( 'click', choiceFieldSelector, self.updateChoiceEventHander );
$parentForm.off( 'change', choiceFieldSelector, self.updateChoiceEventHander );
}
Expand Down

0 comments on commit 978681a

Please sign in to comment.