Home » HTML » HTML_QuickForm » Bug #1694
renderHidden
Details
| Submitted | 2004-06-21 14:55 UTC |
|---|---|
| From | milamamu at tiscali dot it |
| Assigned | mansion |
| Status | Closed |
| Package | HTML_QuickForm |
| PHP Version | Irrelevant |
| OS | Irrilevant |
| Roadmaps | (Not assigned) |
Comments
[2004-06-21 14:55 UTC] milamamu at tiscali dot it
Description:
------------
renderHidden with group name problems..
function renderHidden(&$element)
{
$name = $element->getName();
$name = str_replace(array('[', ']'), array('_', ''), $name);
if ($this->_tpl->placeholderExists($this->_formName . '_hidden')) {
$this->_hidden .= $element->toHtml();
} else {
$this->_tpl->setVariable($this->_formName.'_'.$name.'_html', $element->toHtml());
}
}
[2004-06-21 15:06 UTC] bmansion at mamasam dot com
Is the bug system f*cked or didn't you complete your bug description ?
[2004-06-21 16:02 UTC] milamamu at tiscali dot it
example:
require_once('HTML/QuickForm.php');
require_once('HTML/QuickForm/Renderer/ITStatic.php');
require_once ('HTML/Template/Sigma.php');
$template = new HTML_Template_Sigma(PROJECT_DIR . '/templates');
$template->loadTemplatefile("mod_acp.tpl");
$renderer =& new HTML_QuickForm_Renderer_ITStatic($template);
$form = new HTML_QuickForm('form', 'POST');
$frm[] = &HTML_QuickForm::createElement('hidden', 'ida');
$frm[] = &HTML_QuickForm::createElement('hidden', 'idb');
$frm[] = &HTML_QuickForm::createElement('text', 'idc', 'try');
$form->addGroup($frm, '0', null);
$form->accept($renderer);
print_r($renderer);
Problem is the name :/
Too many [ ]
form_0[ida]_html
form_0[idb]_html
form_0_idc_html
[2004-06-28 13:18 UTC] bmansion at mamasam dot com
This bug has been fixed in CVS.
In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pear.php.net.
In case this was a pear.php.net website problem, the change will show
up on the website in short time.
Thank you for the report, and for helping us make PEAR better.