Skip to content

Commit 158fd7b

Browse files
authored
Merge pull request #832 from kkevinchoo/master
Add readonly attribute support for input and textarea
2 parents f339583 + 8f973b9 commit 158fd7b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/Html2Pdf.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6066,6 +6066,7 @@ protected function _tag_open_TEXTAREA($param)
60666066

60676067
$prop['multiline'] = true;
60686068
$prop['value'] = $level[0]->getParam('txt', '');
6069+
$prop['readonly'] = $param['readonly'] ?? false;
60696070

60706071
$this->pdf->TextField($param['name'], $w, $h, $prop, array(), $x, $y);
60716072

@@ -6174,6 +6175,7 @@ protected function _tag_open_INPUT($param)
61746175
}
61756176
$h = $f*1.3;
61766177
$prop['value'] = $param['value'];
6178+
$prop['readonly'] = $param['readonly'] ?? false;
61776179
$this->pdf->TextField($name, $w, $h, $prop, array(), $x, $y);
61786180
break;
61796181

0 commit comments

Comments
 (0)