Skip to content

Commit 42b1f7d

Browse files
committed
gw-choice-counter.php: Fixed an issue with Choice Counter not working for Image Choice field.
1 parent 0c8de01 commit 42b1f7d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

gravity-forms/gw-choice-counter.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@ function output_script() {
9090
// Event handler for all listeners to avoid DRY and to maintain a pointer reference to the function
9191
// which we can use to explicity unbind event handlers
9292
self.updateChoiceEventHandler = function() {
93-
self.updateChoiceCount( self.formId, self.choiceFieldIds, self.countFieldId, self.values );
93+
setTimeout( function() {
94+
self.updateChoiceCount( self.formId, self.choiceFieldIds, self.countFieldId, self.values );
95+
}, 10 ); // 10ms delay gives DOM time to reflect input change
9496
};
9597

9698
self.init = function() {

0 commit comments

Comments
 (0)