Re: Problem with pseodo HTML object in QuickForm
| From: | Justin Patrin | Date: | Fri, 04 Jun 2004 00:27:49 +0000 |
| Subject: | Re: Problem with pseodo HTML object in QuickForm | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-12882@lists.php.net to get a copy of this message | ||
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', ' '); 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', ' '); 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 BlitzThe 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>