draft of materio_sapi autocomplete

This commit is contained in:
2019-05-29 13:41:34 +02:00
parent ddd80ec288
commit ea2fd59c63
6 changed files with 325 additions and 4 deletions

View File

@@ -24,14 +24,18 @@ class MaterioSapiSearchForm extends FormBase {
public function buildForm(array $form, FormStateInterface $form_state) {
$form['search'] = [
'#type' => 'textfield',
'#title' => $this->t('Search'),
// '#title' => $this->t('Search'),
'#maxlength' => 64,
'#size' => 64,
'#size' => 25,
'#weight' => '0',
'#attributes' => [
"placeholder" => $this->t('Search'),
],
'#autocomplete_route_name' => 'materio_sapi.search_autocomplete',
];
$form['submit'] = [
'#type' => 'submit',
'#value' => $this->t('Submit'),
'#value' => $this->t('Search'),
];
return $form;