You are here

function suggestion_form_alter in Autocomplete Search Suggestions 8.2

Same name and namespace in other branches
  1. 8 suggestion.module \suggestion_form_alter()
  2. 7 suggestion.module \suggestion_form_alter()
  3. 3.0.x suggestion.module \suggestion_form_alter()

Implements hook_form_alter().

File

./suggestion.module, line 27
Contains suggestion.module.

Code

function suggestion_form_alter(&$form, FormStateInterface $form_state, $form_id) {
  $autocomplete = SuggestionHelper::getConfig('autocomplete');
  if (empty($autocomplete[$form_id])) {
    return;
  }
  return SuggestionHelper::alterElement($form, $autocomplete[$form_id]);
}