Skip to content

Commit 348da97

Browse files
committed
gw-conditional-logic-operator-does-not-contain.php: Fixed rule value for does not contain rule.
1 parent 073c80c commit 348da97

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

gravity-forms/gw-conditional-logic-operator-does-not-contain.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,11 @@ public function output_admin_inline_script() {
4646
return operators;
4747
} );
4848

49+
let origRuleNeedsTextValue = window.ruleNeedsTextValue;
4950
// Override the default GF function to add our custom operator.
5051
function ruleNeedsTextValue( rule ) {
51-
return ['does_not_contain','contains', 'starts_with', 'ends_with', '<', '>' ].indexOf ( rule.operator ) !== -1;
52+
let needsTextValue = origRuleNeedsTextValue( rule );
53+
return needsTextValue || rule.operator.indexOf( 'does_not_contain' ) !== -1;
5254
}
5355
</script>
5456
<?php

0 commit comments

Comments
 (0)