You are here

function example_autocomplete_config_form_submit in Search API Autocomplete 7

Submit callback for example_autocomplete_config_form().

After calling this function, the value of $values (if set) will automatically be written to $search->options['custom']. This function just has to take care of sanitizing the data as necessary. Also, values already present in $search->options['custom'], but not in the form, will automatically be protected from being overwritten.

The configured SearchApiAutocompleteSearch object can be found in $form_state['search'].

Parameters

array $form: The type-specific config form, as returned by the "config form" callback.

array $form_state: The complete form state of the form.

array $values: The portion of $form_state['values'] that corresponds to the type-specific config form.

See also

example_autocomplete_config_form()

example_autocomplete_config_form_validate()

File

./search_api_autocomplete.api.php, line 408
Hooks provided by the Search API autocomplete module.

Code

function example_autocomplete_config_form_submit(array $form, array &$form_state, array &$values) {
  $values['user_filters'] = implode("\n", $values['user_filters']);
}