I am building an application using codeigniter and then to generate the report I am using TCPDF. My question is, how to send checked value from my form into tcpdf ? So it will be dynamically.
My HTML code
<div class="controls">
<label class="checkbox inline">
<input type="checkbox" name="request[]" id="Login" value="Login" > Login
</label>
<label class="checkbox inline">
<input type="checkbox" name="request[]" id="Printer" value="Printer"> Printer
</label>
<label class="checkbox inline">
<input type="checkbox" name="request[]" id="Monitor" value="Monitor"> Monitor
</label>
<label class="checkbox inline">
<input type="checkbox" name="request[]" id="Computer" value="Computer"> Computer
</label>
<label class="checkbox inline">
<input type="checkbox" name="request[]" id="Network" value="Network"> Network
</label>
<label class="checkbox inline">
<input type="checkbox" name="request[]" id="Others" value="Lain-lain" > Others
</label>
TCPDF code
$html = <<<EOD
<form action="">
<input type="checkbox" name="request[]" id="Login" value="Login" > Login
<input type="checkbox" name="request[]" id="Login" value="Login" > Printer
<input type="checkbox" name="request[]" id="Login" value="Login" checked="checked"> Monitor
<input type="checkbox" name="request[]" id="Login" value="Login" > Computer
<input type="checkbox" name="request[]" id="Login" value="Login" > Network
<input type="checkbox" name="request[]" id="Login" value="Login" > Lain-lain
</form>
EOD;
$pdf->writeHTMLCell(0, 10, '', '', $html, $border = 0, $ln = 1, $fill = false, $reseth = true, $align = 'L', $autopadding = false);
What should I do ? Using js or what ? Thanks for the help,
Aucun commentaire:
Enregistrer un commentaire