You are here

function template_preprocess_yamlform_container_base_html in YAML Form 8

Prepares variables for form container base HTML template.

Default template: yamlform-container-base-html.html.twig.

Parameters

array $variables: An associative array containing the following key:

  • element: The form element.
  • value: The content for the element.
  • options Associative array of options for element.
    • multiline: Flag to determine if value spans multiple lines.
    • email: Flag to determine if element is for an email.

File

includes/yamlform.theme.inc, line 472
Preprocessors and helper functions to make theming easier.

Code

function template_preprocess_yamlform_container_base_html(array &$variables) {
  $element = $variables['element'];
  $variables['title'] = isset($element['#title']) ? $element['#title'] : NULL;
  $variables['id'] = $element['#yamlform_id'];
}