I am using FPDF class to fill a form. I created on adobe acrobat (by retrieving the data from database). I have no problem for text boxes. but I don't know, how it works for check boxes (how to check them).
Here is my php code.
<?php
$req = $bdd->query("my req");
if ($req && $req->rowCount() > 0) {
$data = $req->fetch();
require_once "fpdm.php";
$fields = array(
'firstname' => $data['firstname'],
'lastname' => $data['lastname'],
'mycheckbox' => $data['isAdult'] ? 'Yes' : 'Off'
);
$pdf = new FPDM("file.pdf");
$pdf->Load($fields, true);
$pdf->Merge();
$pdf->Output("F", "fileToSave.pdf");
}
?>
firstname and lastname fields are filled. but, mycheckbox isn't checked when it has to be checked.