function search_autocomplete_treelist_form_submit in Search Autocomplete 7.3
Same name and namespace in other branches
- 6.4 search_autocomplete.form.treelist.inc \search_autocomplete_treelist_form_submit()
- 6.2 search_autocomplete.form.treelist.inc \search_autocomplete_treelist_form_submit()
- 7.4 search_autocomplete.form.treelist.inc \search_autocomplete_treelist_form_submit()
- 7.2 search_autocomplete.form.treelist.inc \search_autocomplete_treelist_form_submit()
Implements hook_submit(). Save the changes in the database
File
- ./
search_autocomplete.form.treelist.inc, line 97 - Search Autocomplete Display the list of form to autocomplete and themis it as a draggable table.
Code
function search_autocomplete_treelist_form_submit($form, &$form_state) {
//Update the database with the new values
foreach ($form_state['values']['my_items'] as $item) {
db_update('search_autocomplete_forms')
->fields(array(
'weight' => $item['weight'],
'parent_fid' => $item['parent_fid'],
'enabled' => $item['enabled'],
'translite' => $form_state['values']['translite'],
))
->condition('fid', $item['fid'])
->execute();
}
drupal_set_message(t('Configuration success'));
}