1gform.addFilter("gform_is_value_match", function(isMatch, formId, rule) { 2 if (rule.value !== "") { 3 return isMatch; 4 } 5 // console.debug("matching ((blank)) fields: ", rule); 6 7 var get_value = function(formId, fieldId) { 8 var checkboxes = jQuery( 9 'input[id^="choice_{0}_{1}_"]'.format(formId, fieldId) 10 ); 11 if (!checkboxes.length) { 12 return false; 13 } else { 14 var numSelections = 0; 15 checkboxes.each(function() { 16 if (this.checked) { 17 numSelections++; 18 } 19 }); 20 // console.debug("debug: ", numSelections); 21 } 22 return numSelections ? numSelections : null; 23 }; 24 var inputValues = get_value(formId, rule.fieldId); 25 if (inputValues === false) { 26 return isMatch; 27 } 28 if (inputValues === null) { 29 // console.debug("nothing selected: ", inputValues); 30 isMatch = rule.operator == "is" ? true : false; 31 } else { 32 // console.debug("something selected: ", inputValues); 33 isMatch = rule.operator == "is" ? false : true; 34 } 35 // console.debug("match result: ", isMatch); 36 return isMatch; 37});
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.