Skip to content

Commit a16989a

Browse files
committed
gplcb-set-max-by-field-value.js: Updated snippet Set Max Limit by Field Value to work with product fields.
1 parent 1f3c0ac commit a16989a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gp-limit-checkboxes/gplcb-set-max-by-field-value.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ gform.addFilter( 'gplc_group', function( group, fieldId, $elem, gplc ) {
3434

3535
// For Product field, get the value required by tokenizing the string.
3636
if ( group.max.toString().indexOf('|') > -1 ) {
37-
group.max = group.max.split(/|(.*)/s)[0];
37+
group.max = group.max.split( '|' )[0];
3838
}
3939
}
4040

0 commit comments

Comments
 (0)