added autocomplete with documents title in search form
This commit is contained in:
@@ -208,6 +208,9 @@ class EdlpSearchController extends ControllerBase {
|
|||||||
// if($this->request->query->get('field_synonyms')){
|
// if($this->request->query->get('field_synonyms')){
|
||||||
$this->field_synonyms = $this->request->query->get('field_synonyms');
|
$this->field_synonyms = $this->request->query->get('field_synonyms');
|
||||||
// }
|
// }
|
||||||
|
// if($this->request->query->get('node_type')){
|
||||||
|
// $this->node_type = $this->request->query->get('node_type');
|
||||||
|
// }
|
||||||
$this->keys = $this->request->query->get('q');
|
$this->keys = $this->request->query->get('q');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,8 @@ class EdlpSearchForm extends FormBase {
|
|||||||
'#title' => $this->t('Search'),
|
'#title' => $this->t('Search'),
|
||||||
'keys' => [
|
'keys' => [
|
||||||
'#type' => 'search',
|
'#type' => 'search',
|
||||||
|
'#autocomplete_route_name' => 'edlp_search.edlp_search_controller_autocomplete',
|
||||||
|
'#autocomplete_route_parameters' => array('field_name' => 'title'),
|
||||||
'#maxlength' => 20,
|
'#maxlength' => 20,
|
||||||
'#size' => 15,
|
'#size' => 15,
|
||||||
'#weight' => '0',
|
'#weight' => '0',
|
||||||
|
|||||||
Reference in New Issue
Block a user