function fillpdf_form_import_form in FillPDF 6
Same name and namespace in other branches
- 7.2 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 - Implementation of hook_menu().
File
- ./
fillpdf.admin.inc, line 463 - Allows mappings of PDFs to site content
Code
function fillpdf_form_import_form(&$form_state, $pdf_form) {
if (is_numeric($pdf_form)) {
$fid = db_fetch_object(db_query("SELECT * FROM {fillpdf_forms} WHERE fid = %d", $pdf_form));
}
if (!$fid) {
drupal_not_found();
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>Fill PDF Field Mappings export</em> here.'),
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Import'),
'#suffix' => l(t('Reset the form'), $_GET['q']),
);
return $form;
}