function search_autocomplete_suggestion_delete in Search Autocomplete 7.2
Same name and namespace in other branches
- 6.2 search_autocomplete.suggestion.delete.inc \search_autocomplete_suggestion_delete()
Return the filter delete form.
1 string reference to 'search_autocomplete_suggestion_delete'
- search_autocomplete_menu in ./
search_autocomplete.admin.inc - Implementation of hook_menu(). Create an administration page to access admin form
File
- ./
search_autocomplete.suggestion.delete.inc, line 18 - Search Autocomplete Delete a form from Search Autocomplete form list.
Code
function search_autocomplete_suggestion_delete($form_state) {
$form = array();
// get data from database
$sid = arg(5);
if (!$sid && !is_int($sid)) {
drupal_set_message(t('The suggestion has not been found, or the menu callback received a wrong parameter.'), 'error');
watchdog('search_autocomplete', 'The suggestion has not been found, or the menu callback received a wrong parameter.', NULL, WATCHDOG_ERROR);
return $form;
}
$form['sid'] = array(
'#type' => 'hidden',
'#value' => $sid,
);
return confirm_form($form, t('Are you sure you want to delete this suggestion?'), 'admin/config/search/search_autocomplete', NULL, t('Delete'), t('Cancel'));
}