template_preprocess_input(&$variables)
Prepares variables for input templates.
Default template: input.html.twig.
array $variables: An associative array containing:
function template_preprocess_input(&$variables) { $element = $variables['element']; // Remove name attribute if empty, for W3C compliance. if (isset($variables['attributes']['name']) && empty((string) $variables['attributes']['name'])) { unset($variables['attributes']['name']); } $variables['children'] = $element['#children']; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!includes!form.inc/function/template_preprocess_input/8.1.x