function fillpdf_form_import_form in FillPDF 7.2
Same name and namespace in other branches
- 6 fillpdf.admin.inc \fillpdf_form_import_form()
- 7 fillpdf.admin.inc \fillpdf_form_import_form()
Based loosely on Node Export's import form. Import the code and configure the DB settings.
Parameters
mixed $form_state:
mixed $pdf_form:
1 string reference to 'fillpdf_form_import_form'
- fillpdf_menu in ./
fillpdf.module - Implements hook_menu().
File
- ./
fillpdf.admin.inc, line 492 - Allows mappings of PDFs to site content
Code
function fillpdf_form_import_form($form, &$form_state, $pdf_form) {
if (is_numeric($pdf_form)) {
$fid = db_query("SELECT * FROM {fillpdf_forms} WHERE fid = :fid", array(
':fid' => $pdf_form,
))
->fetch();
}
if (!$fid) {
drupal_not_found();
drupal_exit();
}
$form['fid'] = array(
'#type' => 'value',
'#value' => $fid->fid,
);
$form['paste'] = array(
'#type' => 'fieldset',
'#title' => t('Paste code'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
);
$form['paste']['code'] = array(
'#type' => 'textarea',
'#default_value' => '',
'#rows' => 30,
'#description' => t('Cut and paste the results of a <em>FillPDF Field Mappings export</em> here.'),
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Import'),
'#suffix' => l(t('Reset the form'), $_GET['q']),
);
return $form;
}