Re: Re: Problem with pseodo HTML object in QuickForm

From: Date: Fri, 04 Jun 2004 08:41:28 +0000
Subject: Re: Re: Problem with pseodo HTML object in QuickForm
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-12887@lists.php.net to get a copy of this message
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', '&euro;'); $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 ? I need this for 2 reasons. Fist is like i already described, i need to add some text like a €-siign behind a textbox Second is to display a little ? Image behind the textbox to relate to my help-pages. Thank you for Helping Mirco Blitz ----- Original Message ----- From: "Justin Patrin" <papercrane@reversefold.com> To: <pear-general@lists.php.net> Sent: Friday, June 04, 2004 2:27 AM Subject: [PEAR] Re: Problem with pseodo HTML object in QuickForm > Php-Junkie wrote: > > > Hello, > > i try to make a group in QuickForm, that contains a text object and an html object, so i can display something like this: > > > > _______________ € > > > > 1st I tried to add to text boxes next to each other with no Problem: > > $test[] = &HTML_QuickForm::createElement('text', 'test', > > 'TEST', $class); > > $test[] = &HTML_QuickForm::createElement('text', 'test2', > > 'TEST2', $class); > > $form->addGroup($test, 'TEST', 'test', '&nbsp;'); > > > > > > > > 2nd I tried to exchange the second Textbox with some HTML Code: > > $test[] = &HTML_QuickForm::createElement('text', 'test', > > 'TEST', $class); > > $test[] = &HTML_QuickForm::createElement('html', > > '<b>test2</b>'); > > $form->addGroup($test, 'TEST', 'test', '&nbsp;'); > > > > > > Now something happened i did not expext at all. > > The browser displays the grouped on top of the form, even before the header. > > Here the resulting HTML Code of the 2nd script: > > <table> > > <form action="/fs/index.php" method="post" > > name="loginform" id="loginform"> > > <tr><td align="center" valign="top" colspan="2" class="headline">Login</td></tr> > > <b>test2</b> > > <tr><td valign="top" align="right"><div class="normalBLD">test</div></td><td valign="top" align="left"><input class="form" name="TEST[test]" type="text" /></td></tr> > > <tr><td valign="top" align="right"><div > > class="normalBLD"></div></td><td valign="top" align="left"><input name="okimg" type="image" src="./img/buttons/ok.gif" /></td></tr> > > </form> > > </table> > > > > As you can see, the <b>test2</b> is missplaced between 2 Table rows on top of the table. > > Did i do something wrong or is that a bug? > > > > Thank you all for your answers. > > Mirco Blitz > > The html element is for adding your own HTML to the output and does not > put in the tr and td for you. Instead of using the html element, use the > static element. > > -- > paperCrane <Justin Patrin> > > -- > PEAR General Mailing List (http://pear.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

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