In order to make this clearer, a simple example is provided. First, assume we have a
PDF
form containing the fields
volume, publisher, preparer, date, comment
show_publisher, show_preparer.
The first five fields are text input fields; the last two are check boxes.
Our PHP script shall always display the values of the fields
volume, date,
comment, but display the value of the fields
publisher and preparer
only if the corresponding check boxes are checked. If the boxes are checked, their
value is "On" since it was preset when the form was created. And of course the
form also has a submit button, in our case it even has a reset button.
Hitting the submit button runs the following script. This script evaluates the
field data as described above.