function webform_conditional_operator_string_equal in Webform 7.4
Conditional callback for string comparisons.
1 call to webform_conditional_operator_string_equal()
- webform_conditional_operator_string_not_equal in includes/
webform.conditionals.inc - Conditional callback for string comparisons.
1 string reference to 'webform_conditional_operator_string_equal'
- _webform_conditional_operator_info in includes/
webform.conditionals.inc - Implements hook_webform_conditional_operator_info().
File
- includes/
webform.conditionals.inc, line 1543 - Form elements and menu callbacks to provide conditional handling in Webform.
Code
function webform_conditional_operator_string_equal($input_values, $rule_value) {
foreach ($input_values as $value) {
// Checkbox values come in as 0 integers for unchecked boxes.
$value = $value === 0 ? '' : $value;
if (strcasecmp($value, $rule_value) === 0) {
return TRUE;
}
}
return FALSE;
}