HTML_QuickForm 'html' Element Bug
I’ve been playing around with the PHP PEAR class HTML_QuickForm. So far using it has not been very quick, but I hope to get used to passing the form work off to other code. Of course, it also means that you have to review someone else’s code if it doesn’t work like you expect.
In trying to duplicate and improve a form on my client’s website, I wanted to use the ‘html’ element to add some text to an element group. It turns out that you can’t do this, as the formatting will be wrong. There is a bug in PEAR for this, but they haven’t updated the documentation. Don’t let it waste an hour of your time like it did mine!
Instead of this:
$aryGroup = &HTML_QuickForm::createElement('html’, 'Choose a password.’);
$aryGroup = &HTML_QuickForm::createElement('static’, null, null, 'Choose a password.’);