Re: HTML_QuickForm2: BackgroundText element

From: Date: Thu, 13 May 2010 13:34:35 +0000
Subject: Re: HTML_QuickForm2: BackgroundText element
References: 1 2 3 4 5 6  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-53477@lists.php.net to get a copy of this message
On Thu, 2010-05-13 at 07:38 +0200, Christian Weiske wrote: > 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. > Yeah, I saw that after checking out your demo page. I'm impressed you did it with relatively little client-side code. > What about page validity? > My solution is only valid for HTML5 doctypes, which most people aren't ready for yet. Luckily, it's pretty easy to port existing XHTML 1.0 sites to HTML5! Cheers, Mike

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