You are here

function template_preprocess_yamlform_container_base_text in YAML Form 8

Prepares variables for form container base text template.

Default template: yamlform-container-base-text.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 491
Preprocessors and helper functions to make theming easier.

Code

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