Home » HTML » HTML_QuickForm » Bug #6104
Error in renderer
Details
| Submitted | 2005-11-29 11:02 UTC |
|---|---|
| From | jonathanmartens at gmx dot net |
| Status | Bogus |
| Package | HTML_QuickForm |
| PHP Version | 5.0.4 |
| OS | Win XP SP2 |
| Roadmaps | (Not assigned) |
Comments
[2005-11-29 11:02 UTC] jonathanmartens at gmx dot net
Description:
------------
Installation:
- PHP 5.0.4
- PEAR 1.4.5
- WIN XP SP2
- Apache 2.0.54
Renderer seems to drop newline and tab charachters after the END ERROR tag at the end of the Element template.
Test script:
---------------
addElement('text', 'date', TEXT_DATE, null, '');
$form->addElement('select', 'id_device', TEXT_DEVICE, array(0 => TEXT_CHOOSE, 1 => TEXT_OPTION), '');
$form->addElement('reset', 'btnRESET', TEXT_RESET, 'parameters');
$form->addElement('submit', 'btnSubmit', TEXT_SUBMIT, 'parameters');
/*
* template should read like:
*
* {label}
* \n\t\t{element}
* *
* {error}
*
*
*/
$template['element'] = "\n\t{label}\n\t\n\t\t{element}\n\t\t*\n\t\t{error}\n\t\n\n";
$renderer =& $form->defaultRenderer();
$renderer->setElementTemplate($template['element']);
if ($form->validate()) {
$form->freeze();
}
$form->display();
?>
Expected result:
----------------
TEXT_DATE
TEXT_DEVICE
TEXT_CHOOSE
TEXT_OPTION
Actual result:
--------------
TEXT_DATE
TEXT_DEVICE
TEXT_CHOOSE
TEXT_OPTION
</form>
[2005-11-29 11:07 UTC] jonathanmartens at gmx dot net
Oops it seems that the HTML is not rendering very clearly in this bug report:
Expected result:
----------------
<tr>
<tab><td valign="top">TEXT_DEVICE</td>
<tab><tab><td>
<tab><tab><select name="id_device">
<tab><tab><tab><option value="0">TEXT_CHOOSE</option>
<tab><tab><tab><option value="1">TEXT_OPTION</option>
<tab><tab></select>
<tab></td>
</tr>
Actual result:
--------------
<tr>
<tab><td valign="top">TEXT_DEVICE</td>
<tab><td>
<tab><tab><select name="id_device">
<tab><option value="0">TEXT_CHOOSE</option>
<tab><option value="1">TEXT_OPTION</option>
</select></td>
</tr>
[2005-11-29 11:08 UTC] jonathanmartens at gmx dot net
Incorrect e-mailaddress for report (changed)