You are here

function _webform_display_email in Webform 7.4

Same name and namespace in other branches
  1. 6.3 components/email.inc \_webform_display_email()
  2. 7.3 components/email.inc \_webform_display_email()

Implements _webform_display_component().

File

components/email.inc, line 269
Webform module email component.

Code

function _webform_display_email($component, $value, $format = 'html', $submission = array()) {
  return array(
    '#title' => $component['name'],
    '#title_display' => $component['extra']['title_display'] ? $component['extra']['title_display'] : 'before',
    '#weight' => $component['weight'],
    '#theme' => 'webform_display_email',
    '#theme_wrappers' => $format == 'html' ? array(
      'webform_element',
    ) : array(
      'webform_element_text',
    ),
    '#format' => $format,
    '#value' => isset($value[0]) ? $value[0] : '',
    '#translatable' => array(
      'title',
      'placeholder',
    ),
  );
}