Re: Re: Problem with pseodo HTML object in QuickForm

From: Date: Fri, 04 Jun 2004 09:46:13 +0000
Subject: Re: Re: Problem with pseodo HTML object in QuickForm
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-12889@lists.php.net to get a copy of this message
PHP-Junkie wrote: >Hallo, > >as Justin Patrin told me, i tried to use the static element in my Group, to >display a ¤ sign behind my Textbox. > >Code: >$test[] = &HTML_QuickForm::createElement('text', 'test', >'TEST', $class); >$test[] = &HTML_QuickForm::createElement('static', 'test2', >'€'); >$form->addGroup($test, null, null, 'Price'); > >When i use teh Static element standalone it works fine, but in another line. >When i use it at the group like you see in the Code, it is not displayed at >all. >I even don't find it inside the HTML-code. > >What can i do, to display some HTML text or some HTML code behind a Textbox >? Try : $test[0] = &HTML_QuickForm::createElement('text', 'mytext', '', $class); $test[1] = &HTML_QuickForm::createElement('static', 'euro', '', '€'); $form->addGroup($test, 'mygroup', 'Price :', ' ', false); As Justin said, it is always a good idea to give a name to your elements, whether they are a group or a single element. If you are interested in what the parameters mean for these methods, refer to the documentation. Bertrand Mansion Mamasam

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