PageSourceSearch

https://reliancehomecomfort.com/wp-content/plugins/gravity-forms-a…/js/operators/isInListOperator.js?ver=2.5.0

js reliancehomecomfort.com collected 2026-09-25 03:59:06 UTC 1,961 bytes, 70 lines download raw bytes

1try {
2  gform.addFilter(
3    "gform_conditional_logic_operators",
4    function (operators, objectType, fieldId) {
5      operators.inList = "in csv";
6      operators.notInList = "not in csv";
7      gf_vars["inList"] = "in csv";
8      gf_vars["notInList"] = "not in csv";
9      gf_vars["in csv"] = "in csv";
10      gf_vars["not in csv"] = "not in csv";
11
12      return operators;
13    }
14  );
15
16  gform.addFilter(
17    "gform_conditional_logic_values_input",
18    function (html, objectType, ruleIdx, fieldId, value) {
19      try {
20        var logicObject = GetConditionalLogicObject(objectType);
21        if (
22          html &&
23          objectType == "field" &&
24          (logicObject.rules[ruleIdx].operator === "inList" ||
25            logicObject.rules[ruleIdx].operator === "notInList")
26        ) {
27          console.log("returning free text field");
28          return (
29            '<input type="text" placeholder="Enter a value" data-js-rule-input="value" class="gfield_rule_select gfield_rule_input active" id="field_rule_value_' +
30            ruleIdx +
31            '" name="field_rule_value_' +
32            ruleIdx +
33            '" value="' +
34            value +
35            '">'
36          );
37        }
38      } catch (e) {}
39      return html;
40    }
41  );
42
43  gform.addFilter("gform_is_value_match", function (isMatch, formId, rule) {
44    if (!rule || (rule.operator != "inList" && rule.operator != "notInList")) {
45      return isMatch;
46    }
47
48    var fieldValues = gfacl_get_field_values(formId, rule.fieldId).map((s) =>
49      s.toLowerCase()
50    );
51
52    var ruleValues = rule.value
53      .toLowerCase()
54      .split(",")
55      .map((v) => v.trim())
56      .filter(function (entry) {
57        return entry;
58      });
59
60    let in_list = false;
61    for (const theFieldVal of fieldValues) {
62      in_list = ruleValues.includes(theFieldVal);
63      if (in_list) {
64        break;
65      }
66    }
67
68    return rule.operator == "inList" ? in_list : !in_list;
69  });
70} catch (e) {}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.