function fillpdf_forms in FillPDF 6
Manage your existing forms, or upload a new one
6 string references to 'fillpdf_forms'
- fillpdf_forms_submit in ./
fillpdf.admin.inc - Creates a new Form from the uploaded PDF, including parsed fields
- fillpdf_menu in ./
fillpdf.module - Implementation of hook_menu().
- fillpdf_update_6001 in ./
fillpdf.install - Add the destination_path field to {fillpdf_forms}.
- fillpdf_update_6002 in ./
fillpdf.install - Add the replacements field to {fillpdf_forms} and {fillpdf_fields}.
- fillpdf_update_6003 in ./
fillpdf.install - The people have spoken. Improve PostgreSQL support, at last.
File
- ./
fillpdf.admin.inc, line 130 - Allows mappings of PDFs to site content
Code
function fillpdf_forms() {
$result = db_query("SELECT title, fid FROM {fillpdf_forms} ORDER BY title");
$header = array(
t('Title'),
array(
'data' => t('Operations'),
'colspan' => '4',
),
);
while ($pdf_form = db_fetch_object($result)) {
$row = array(
check_plain($pdf_form->title),
l(t('Edit'), "admin/content/fillpdf/{$pdf_form->fid}"),
l(t('Delete'), "admin/content/fillpdf/{$pdf_form->fid}/delete"),
l(t('Export field mappings'), "admin/content/fillpdf/{$pdf_form->fid}/export"),
l(t('Import field mappings'), "admin/content/fillpdf/{$pdf_form->fid}/import"),
);
$rows[] = $row;
}
$form['existing_forms'] = array(
'#type' => 'markup',
'#value' => theme('table', $header, $rows, array(
'id' => 'fillpdf',
)),
);
$form['#attributes'] = array(
'enctype' => "multipart/form-data",
);
$form['upload_pdf'] = array(
'#type' => 'file',
'#title' => 'Upload',
'#description' => 'Upload a PDF template to create a new form',
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Submit'),
'#weight' => 15,
);
return $form;
}