function formdefaults_import_submit in Form Defaults 7
Same name and namespace in other branches
- 5.3 formdefaults.admin.inc \formdefaults_import_submit()
- 6.2 formdefaults.admin.inc \formdefaults_import_submit()
File
- ./
formdefaults.admin.inc, line 217 - formdefaults.admin.inc Include for formdefaults administration screen.
Code
function formdefaults_import_submit($formid, &$form_state) {
$form_values = $form_state['values'];
$forms = unserialize(base64_decode($form_values['data']));
formdefaults_data($forms);
if ($_POST['op'] == 'Import') {
foreach ($forms as $key => $formdata) {
_formdefaults_save_form($key, $formdata);
}
unset($_SESSION['formdefaults_data']);
}
}