function countries_configuration_options_form_reset_submit in Countries 8
Same name and namespace in other branches
- 7.2 modules/countries_configuration/countries_configuration.admin.inc \countries_configuration_options_form_reset_submit()
Reset submit handler for countries_configuration_options_form().
This saves an empty array() to the database, resulting in the default values being loaded when the record is loaded again.
1 string reference to 'countries_configuration_options_form_reset_submit'
- countries_configuration_options_form in modules/
countries_configuration/ countries_configuration.admin.inc - Menu callback for generating a countries settings admin form.
File
- modules/
countries_configuration/ countries_configuration.admin.inc, line 94 - Administrative functions / callbacks.
Code
function countries_configuration_options_form_reset_submit($form, &$form_state) {
// This will reset to the default settings on load.
db_delete('countries_data')
->condition('iso2', $form_state['values']['iso2'])
->condition('name', $form_state['values']['name'])
->execute();
}