Home » HTML » HTML_Template_Flexy » Bug #2093
Use of prefix/suffix with form tags
Details
| Request #2093 | Use of prefix/suffix with form tags |
|---|---|
| Submitted | 2004-08-09 12:17 UTC |
| From | jwall at webpeak dot com |
| Status | Wont fix |
| Package | HTML_Template_Flexy |
| PHP Version | 4.3.8 |
| OS | Linux |
| Roadmaps | (Not assigned) |
Comments
[2004-08-09 12:17 UTC] jwall at webpeak dot com
Description:
------------
1. Is there a way to use prefix/suffix with form tags? To make it work for me, I am modifying HTTP_Template_Flexy_Element method toHtmlNoClose() like:
return "{$prefix}<{$ret->tag}".$ret->attributesToHTML() . '>' . $ret->childrenToHTML() . $suffix;
Ideally, we would have:
OutsidePrefix<tag>InsideSuffix
...
InsidePrefix</tag>OutsideSuffix
Reproduce code:
---------------
$elements['pageForm']=new HTML_Template_Flexy_Element();
$elements['pageForm']->suffix='Some Suffix';
$elements['pageForm']->prefix='Some Prefix';
Expected result:
----------------
Some Prefix<form name="pageForm" method="POST">
</form>Some Suffix
Actual result:
--------------
<form name="pageForm" method="POST">
</form>
the solution indicated on mailing list involves adding:
$this->elements['pageForm']->closeToHtml();
[2004-08-10 13:28 UTC] jwall at webpeak dot com
Here is a link to files which were modified to add desired behaviour:
http://www.webpeak.com/~jwall/pear_changes/
[2004-08-17 15:08 UTC] jwall at webpeak dot com
I agree it adds unneccesary complexity. I assume you can use the same technique for the close tag?
If so, then we can close this one.