You are here

public static function YamlFormEmailMultiple::preRenderYamlFormEmailMultiple in YAML Form 8

Prepares a #type 'email_multiple' render element for theme_element().

Parameters

array $element: An associative array containing the properties of the element. Properties used: #title, #value, #description, #size, #maxlength, #placeholder, #required, #attributes.

Return value

array The $element with prepared variables ready for theme_element().

File

src/Element/YamlFormEmailMultiple.php, line 76

Class

YamlFormEmailMultiple
Provides a form element for entering multiple comma delimited email addresses.

Namespace

Drupal\yamlform\Element

Code

public static function preRenderYamlFormEmailMultiple($element) {
  $element['#attributes']['type'] = 'text';
  Element::setAttributes($element, [
    'id',
    'name',
    'value',
    'size',
    'maxlength',
    'placeholder',
  ]);
  static::setAttributes($element, [
    'form-textfield',
    'form-email-multiple',
  ]);
  return $element;
}