سؤال

I am unsure if I am going about this correctly. Why using TCPDF when I attempt to post it returns an empty textfield?

$pdf->Cell(35, 5, 'Job Number ');
$pdf->TextField($_POST["jobnum"], 50, 5);
هل كانت مفيدة؟

المحلول

You need to use the fourth $opt parameter see the TCPDF TextField reference and Acrobat API Reference

$pdf->TextField("jobnum", 50, 5, array(), array('v'=>$_POST["jobnum"] ) );

نصائح أخرى

TCPDF requires the TextField() function to be like so: TextField("string", number, number)

so you need to make it like this:

$pdf->TextField("'".$_POST["jobnum"]."'", 50, 5);
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top