A few Quickform questions
| From: | Janus & Heidi | Date: | Sun, 02 Jan 2005 07:56:29 +0000 |
| Subject: | A few Quickform questions | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-16556@lists.php.net to get a copy of this message | ||
Hi, I have a few Quickform questions, hope you can help me :)
1. How do I check if an item has been selected in a select. At the moment I am doing this:
$form->addElement('select', 'php_version', 'PHP version', array('select' => '-- select one please --', '3.x' => '3.x', '4.x' => '4.x'));
$form->addRule('php_version', 'Please select the PHP version', 'regex', '/[^(select)]/');
But surely that must be a better way besides using a regex like this ?
2. I found a tutorial where the author is extending HTML_QuickForm like this, building the main form in the constructor:
http://www.pookey.co.uk/pear/qf_hello2.phps
Is this a good way to use HTML_QuickForm, to me it seems a bit weird ?
3. Does QuickForm work with PHP5 (E_ALL) ?
Janus Roenne