Home » HTML » HTML_QuickForm » Bug #5902
hierselect and QuickHtml
Details
| Request #5902 | hierselect and QuickHtml |
|---|---|
| Submitted | 2005-11-09 02:31 UTC |
| From | dobes at lnx dot cz |
| Status | Wont fix |
| Package | HTML_QuickForm |
| PHP Version | Irrelevant |
| OS | Gentoo |
| Roadmaps | (Not assigned) |
Comments
[2005-11-09 02:31 UTC] dobes at lnx dot cz
Description:
------------
Is possible to move function script from first hierselect just after form tag? When I use tempate with different formating, hierselect upper then first defined is not working.
PaD
PEAR version: HTML_QuickForm-3.2.5
PHP Version 4.4.0-gentoo-r1
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20051013 Firefox/1.0.7
Test script:
---------------
$renderer =& new HTML_QuickForm_Renderer_QuickHtml();
...
$form->addElement('hierselect', 'firest', 'Select:', array('style' => 'width: 20em;'), '')
$form->addElement('hierselect', 'second', 'Select:', array('style' => 'width: 20em;'), '')
...
$form->accept($renderer);
$template = ' ... %second% ... %first% ... ';
$template = str_replace('%firest%', $renderer->elementToHtml('first'), $template);
$template = str_replace('%second%', $renderer->elementToHtml('second'), $template);
echo $renderer->toHtml($tempate);
Expected result:
----------------
the
//<![CDATA[
function _hs_findOptions(ary, keys)
{
...
after <form>, to be working with 'second' too... In such templates.
Actual result:
--------------
the
//<![CDATA[
function _hs_findOptions(ary, keys)
{
...
is part of first defined hierselect