function webform_conditional_value_datetime in Webform 7.4
Utility function to convert incoming time and dates into strings.
3 calls to webform_conditional_value_datetime()
- webform_conditional_operator_datetime_after in includes/
webform.conditionals.inc - Conditional callback for date and time comparisons.
- webform_conditional_operator_datetime_before in includes/
webform.conditionals.inc - Conditional callback for date and time comparisons.
- webform_conditional_operator_datetime_equal in includes/
webform.conditionals.inc - Conditional callback for date and time comparisons.
File
- includes/
webform.conditionals.inc, line 1749 - Form elements and menu callbacks to provide conditional handling in Webform.
Code
function webform_conditional_value_datetime($input_values) {
// Convert times into a string.
$input_values = isset($input_values['hour']) ? array(
webform_date_string(webform_time_convert($input_values, '24-hour'), 'time'),
) : $input_values;
// Convert dates into a string.
$input_values = isset($input_values['month']) ? array(
webform_date_string($input_values, 'date'),
) : $input_values;
return $input_values;
}