[QuickForm] input text readonly
| From: | Damien Cros | Date: | Tue, 11 Oct 2005 09:09:10 +0000 |
| Subject: | [QuickForm] input text readonly | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-21344@lists.php.net to get a copy of this message | ||
Hi,
I have a form with several input text that I want to be readonly.
The right html syntax is:
<input type="text" readonly>
How can I do that with quickform? I didn't find any setReadonly() method in the element class.
The only way is to do something like
$form->addElement('text', "myinputtext', "", array('readonly'=>true));
which gives you this html tag:
<input type="text" readonly="1">
I don't know if this syntax is still W3C compliant?
bye
damien
Attachment: [application/pkcs7-signature] smime.p7s
Attachment: [application/pkcs7-signature] smime.p7s