Re: HTML_QuickForm2: BackgroundText element

From: Date: Thu, 13 May 2010 05:38:15 +0000
Subject: Re: HTML_QuickForm2: BackgroundText element
References: 1 2 3 4 5  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-53476@lists.php.net to get a copy of this message
Hi Michael,
I made a custom element for QuickForm2, BackgroundText: http://demo.cweiske.de/qf2-things/demo-backgroundtext.php
Is that an element that would fit into the QF2 package?
The element is useful, but I'd prefer having it in a separate package, due to QuickForm 3.x experiences (e.g. hierselect was rewritten several times and right now needs yet another rewrite: http://pear.php.net/bugs/bug.php?id=16603)
Ok. Shall every single additional element be a separate package? That could give us some clutter, but maybe that's ok. Until I propose it, here is the code: http://github.com/cweiske/HTML_QuickForm2_BackgroundText
FWIW, I just committed similar feature to the Mozilla Website: http://viewvc.svn.mozilla.org/vc?revision=67129&view=revision It's a bit more generic and has the advantage of HTML5 support and not submitting the placeholder text if no text is entered. Feel free to steal bits from it!
I made sure that you don't get that placeholder value when using your form's getValue() method, so we're on par here. But having a pure javascript solution is handy, yes. What about page validity? Christian

« previous php.pear.dev (#53476) next »