function _fillpdf_transform_field_value in FillPDF 7
Same name and namespace in other branches
- 6 fillpdf.module \_fillpdf_transform_field_value()
- 7.2 fillpdf.module \_fillpdf_transform_field_value()
Apply any field value transformations defined via the UI.
Note that the replacement arguments need to already have been run through _fillpdf_replacements_to_array().
See also
_fillpdf_replacements_to_array()
1 call to _fillpdf_transform_field_value()
- fillpdf_merge_pdf in ./
fillpdf.module - Constructs a page and sends it to the browser or saves it.
File
- ./
fillpdf.module, line 2006
Code
function _fillpdf_transform_field_value($value, $pdf_replacements, $field_replacements) {
if (empty($pdf_replacements) && empty($field_replacements)) {
return $value;
}
elseif (!empty($field_replacements) && isset($field_replacements[$value])) {
return $field_replacements[$value];
}
elseif (!empty($pdf_replacements) && isset($pdf_replacements[$value])) {
return $pdf_replacements[$value];
}
else {
return $value;
}
}