Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 5fb907b7 authored by escuriola's avatar escuriola
Browse files

OEL-1367: Fix default input value in the search form.

parent 1d4d309c
No related branches found
No related tags found
2 merge requests!157OEL-1668: Update epic list pages.,!136OEL-1367: New Look & Feel for search form in search page and remove theming from block config form.
......@@ -48,6 +48,11 @@ class SearchForm extends FormBase {
if (empty($config['input']['name'])) {
return [];
}
$input_value = '';
if (!empty($config['input']['name'])) {
$input_value = $this->getRequest()->get($config['input']['name']);
}
$form_state->set('oe_whitelabel_search_config', $config);
$form['#region'] = $config['form']['region'];
......@@ -60,7 +65,7 @@ class SearchForm extends FormBase {
'#margin_class' => 'mb-0',
'#form_id' => $this->getFormId(),
'#region' => $config['form']['region'],
'#default_value' => $config['input']['name'],
'#default_value' => $input_value,
'#required' => 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