1

Hi,

I have implemented HTML2PDF in my website and it is working fine except for HTML radio button.
I am not able to display checked radio button in PDF (unchecked radio button appears in PDF) although if i directly display the HTML form, i am able to see selected radio button.

I am using radio button like:
<input type="radio" value="Yes" name="question1" checked='checked' />

Is there anything wrong?

Please help me.....

2

i will check this, but in my remember, it was a pb with TCPDF sad
Ancien pseudo : lolo

3

Is there any other way to display selected radio button in PDF?

4

aoups, there was a error on html2pdf...
file : html2pdf.class.php version 4.01
line : 5250
function : o_INPUT
change :
				case 'radio':
					$w = 3;
					$h = $w;
					if ($h<$f) $y+= ($f-$h)*0.5;
					$this->pdf->RadioButton($name, $w, array(), array(), ($param['value'] ? $param['value'] : 'On'), isset($param['selected']), $x, $y);
					break;

by :
				case 'radio':
					$chk = isset($param['checked']);
					$w = 3;
					$h = $w;
					if ($h<$f) $y+= ($f-$h)*0.5;
					$this->pdf->RadioButton($name, $w, array(), array(), ($param['value'] ? $param['value'] : 'On'), $chk, $x, $y);
					break;

Ancien pseudo : lolo

5

It works, thanks