Skip to content

Commit d71cc93

Browse files
committed
gw-conditional-logic-operator-does-not-contain.php: Fixed rule value for does not contain rule.
1 parent 2e9d14c commit d71cc93

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ public function output_admin_inline_script() {
4545
operators.does_not_contain = 'does not contain';
4646
return operators;
4747
} );
48+
gform.addFilter( 'gform_conditional_logic_values_input', function( str, objectType, ruleIndex, selectedFieldId, value ) {
49+
const operator = jQuery( '#field_rule_operator_' + ruleIndex ).val();
50+
if ( operator !== 'does_not_contain' ) {
51+
return str;
52+
}
53+
str = '<input type="text" placeholder="Enter a value" data-js-rule-input="value" class="gfield_rule_select gfield_rule_input active" id="field_rule_value_' + ruleIndex + '" name="field_rule_value_' + ruleIndex + '" value="' + value + '">';
54+
return str;
55+
} );
4856
</script>
4957
<?php
5058
}

0 commit comments

Comments
 (0)