From 978681a2ace81ad79752b6d39cee3f27f6f03dbb Mon Sep 17 00:00:00 2001 From: Saif Sultan Date: Tue, 19 Dec 2023 18:55:56 +0530 Subject: [PATCH] `gw-choice-counter.php`: Fixed an issue with Multi Select field not working on the same choice field ids. --- gravity-forms/gw-choice-counter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gravity-forms/gw-choice-counter.php b/gravity-forms/gw-choice-counter.php index dd0ec126..99fe281e 100644 --- a/gravity-forms/gw-choice-counter.php +++ b/gravity-forms/gw-choice-counter.php @@ -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 ); }