Skip to content

Commit 6cc0ab7

Browse files
authored
gpnf-limit-entry-min-max-from-field.php: Fixed an issue with the snippet not working correctly on form load.
1 parent 116f997 commit 6cc0ab7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gp-nested-forms/gpnf-limit-entry-min-max-from-field.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public function output_script() {
150150
var $maxField = $( '#' + maxFieldId );
151151
var value = parseInt($maxField.val());
152152

153-
return value ? value : self.defaultMax;
153+
return isNaN(value) ? Infinity : (value || self.defaultMax);
154154
});
155155

156156
gform.addAction( 'gform_input_change', function( el, formId, fieldId ) {

0 commit comments

Comments
 (0)