function template_preprocess_yamlform_element_base_html in YAML Form 8
Prepares variables for form element base HTML template.
Default template: yamlform-element-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.
1 call to template_preprocess_yamlform_element_base_html()
- template_preprocess_yamlform_element_base_text in includes/
yamlform.theme.inc - Prepares variables for form element base text template.
File
- includes/
yamlform.theme.inc, line 437 - Preprocessors and helper functions to make theming easier.
Code
function template_preprocess_yamlform_element_base_html(array &$variables) {
$element = $variables['element'];
$variables['title'] = YamlFormElementHelper::isTitleDisplayed($element) ? $element['#title'] : NULL;
}