You are here

function webform_conditional_form_date in Webform 7.4

Form callback for date conditional fields.

1 string reference to 'webform_conditional_form_date'
_webform_conditional_operator_info in includes/webform.conditionals.inc
Implements hook_webform_conditional_operator_info().

File

includes/webform.conditionals.inc, line 1311
Form elements and menu callbacks to provide conditional handling in Webform.

Code

function webform_conditional_form_date($node) {
  static $count = 0;
  $element = array(
    '#title' => NULL,
    '#title_display' => 'invisible',
    '#size' => 24,
    '#attributes' => array(
      'placeholder' => t('@format or valid date', array(
        '@format' => webform_date_format('short'),
      )),
    ),
    '#type' => 'textfield',
    '#name' => 'webform-conditional-date-' . $count++,
  );
  return drupal_render($element);
}