Delicious Bookmark this on Delicious Share on Facebook SlashdotSlashdot It! Digg! Digg



PHP : Function Reference : Forms Data Format Functions : fdf_get_value

fdf_get_value

Get the value of a field (PHP 4, PHP 5)
mixed fdf_get_value ( resource fdf_document, string fieldname [, int which] )


Code Examples / Notes » fdf_get_value

mclinden

(i filed a bug report/feature request for this on bugs.php.net and assigned it to myself hartmut@php.net)
The default behavior for the FDF Toolkit is to return an FDFErcNoValue for the FDFGetValue when the field exists but has no value.
Whether or not this is truly an error is debateable. It seems to become an issue in documents created by Acrobat 5 when optional fields are included in a form with required fields since the default behavior seems to be to populate the HTTP_FDF_DATA with the results of the FDFNextFieldName enumerator, which would include the fields which have no value.
This would not be a problem except that the PHP function fdf_get_value() does not specifically test for the FDFErcNoValue condition but, instead, tests for the more general FDFErcOK. If this value is not the result of the error code, the system issues warnings (the display of which could be turned off), but the broader question is, should this be a warning condition at all?
Put another way, should a return of FDFErcNoValue for FDFGetValue be considered an event worth generating a warning?


Change Language


Follow Navioo On Twitter
fdf_add_doc_javascript
fdf_add_template
fdf_close
fdf_create
fdf_enum_values
fdf_errno
fdf_error
fdf_get_ap
fdf_get_attachment
fdf_get_encoding
fdf_get_file
fdf_get_flags
fdf_get_opt
fdf_get_status
fdf_get_value
fdf_get_version
fdf_header
fdf_next_field_name
fdf_open_string
fdf_open
fdf_remove_item
fdf_save_string
fdf_save
fdf_set_ap
fdf_set_encoding
fdf_set_file
fdf_set_flags
fdf_set_javascript_action
fdf_set_on_import_javascript
fdf_set_opt
fdf_set_status
fdf_set_submit_form_action
fdf_set_target_frame
fdf_set_value
fdf_set_version
eXTReMe Tracker