You are here

function fillpdf_get_fields in FillPDF 7

Same name and namespace in other branches
  1. 6 fillpdf.module \fillpdf_get_fields()
  2. 7.2 fillpdf.module \fillpdf_get_fields()

Retrieve the PDF's fields.

3 calls to fillpdf_get_fields()
FillPdfMergeTestCase::backendTest in tests/FillPdfMergeTestCase.test
Tests PDF merging.
FillPdfMergeTestCase::testPdfMerging in tests/FillPdfMergeTestCase.test
Test PDF merging.
fillpdf_import_mappings in ./fillpdf.admin.inc
Import an array of decoded FillPDF mappings.

File

./fillpdf.module, line 1929

Code

function fillpdf_get_fields($fid) {
  $result = db_query('SELECT * FROM {fillpdf_fields} WHERE fid = :fid', array(
    ':fid' => $fid,
  ));
  $return = array();
  foreach ($result as $result_array) {
    $return[$result_array->pdf_key] = array(
      'label' => $result_array->label,
      'value' => $result_array->value,
    );
  }
  return $return;
}