QF: add text after a text box

From: Date: Wed, 25 Feb 2004 18:44:50 +0000
Subject: QF: add text after a text box
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-10934@lists.php.net to get a copy of this message
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

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