Skip to content
Snippets Groups Projects
Commit 0143d50f authored by Angie Byron's avatar Angie Byron
Browse files

Issue #1893400 by swentel, dawehner: Fixed Autocomplete is busted.

parent 0b17f26a
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -4096,11 +4096,13 @@ function form_process_autocomplete($element, &$form_state) {
$element['#attached']['library'][] = array('system', 'drupal.autocomplete');
// Provide a hidden element for the JavaScript behavior to bind to. Since
// this element is for client-side functionality only, and we don't want to
// collect any input from it, use #theme='hidden' instead of #type='hidden'.
// collect any input from it, use #theme = 'input__hidden' and #pre_render =
// 'form_pre_render_hidden' instead of #type='hidden'.
// @todo Refactor autocomplete.js to accept Drupal.settings instead of
// requiring extraneous markup.
$element['autocomplete'] = array(
'#theme' => 'hidden',
'#theme' => 'input__hidden',
'#pre_render' => array('form_pre_render_hidden'),
'#attributes' => array(
'id' => $element['#id'] . '-autocomplete',
'value' => url($element['#autocomplete_path'], array('absolute' => TRUE)),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment