Re: QF: add text after a text box

From: Date: Thu, 26 Feb 2004 06:56:11 +0000
Subject: Re: QF: add text after a text box
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-10947@lists.php.net to get a copy of this message
Thanks. How do you have the templating engine pass the template the $addText variable? _________________________ "Prashant Karhade" <karhade@yahoo.com> wrote in message news:20040226050716.40671.qmail@web13424.mail.yahoo.com... > You can change the default element template to > "{element} $addText" say and it will work. I do it in > some of my forms and it works just fine. > > PPK. > > --- Ignatius Reilly <ignatius.reilly@free.fr> wrote: > > I want to add some text after a small text box. For > > instance: > > Purchase: || <text box> units (1 ? each) > > > > The following are not options: > > - use array labels (I use them for a different > > purpose) > > - define special group templates (I have use groups > > the standard way > > otherwise) > > > > I tried a group text + static, but the static won't > > display > > > > So I found the following hack: > > $add = &HTML_QuickForm::createElement( "text", > > "units", "", "size=2" ) ; > > $add_text = &HTML_QuickForm::createElement( > > "static", "", "" ) ; // dummy > > $this->addGroup( array( $add, $add_text ), null, > > "Purchase", "&nbsp;(1 ? > > each)", FALSE ) ; > > // the additional text goes in the group separation > > string > > > > It works, but there may cleaner way to achieve the > > same. > > When I have the time (...) I will pore the code to > > understand why group = > > text + static does not work. > > > > Ignatius > > > > -- > > PEAR General Mailing List (http://pear.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > __________________________________ > Do you Yahoo!? > Get better spam protection with Yahoo! Mail. > http://antispam.yahoo.com/tools

« previous php.pear.general (#10947) next »