function fillpdf_form_edit_submit in FillPDF 5
Same name and namespace in other branches
- 6 fillpdf.admin.inc \fillpdf_form_edit_submit()
- 7.2 fillpdf.admin.inc \fillpdf_form_edit_submit()
- 7 fillpdf.admin.inc \fillpdf_form_edit_submit()
File
- ./
fillpdf.module, line 216 - Allows mappings of PDFs to site content
Code
function fillpdf_form_edit_submit($form_id, &$form_values) {
if (!$form_values['form']->new) {
if ($form_values['op'] == t('Delete')) {
return 'admin/content/fillpdf/delete/' . $form_values['form']->fid;
}
db_query("UPDATE {fillpdf_forms} SET title = '%s', url = '%s' WHERE fid = %d", $form_values['title'], $form_values['url'], $form_values['form']->fid);
}
else {
$form_values['form']->fid = db_next_id('{fillpdf}_fid');
db_query("INSERT INTO {fillpdf_forms} (fid, title, url) VALUES(%d, '%s', '%s')", $form_values['form']->fid, $form_values['title'], $form_values['url']);
}
return 'admin/content/fillpdf';
}