PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » HTML » HTML_Template_Flexy » Bug #2093

Use of prefix/suffix with form tags

Details

Request #2093Use of prefix/suffix with form tags
Submitted2004-08-09 12:17 UTC
Fromjwall at webpeak dot com
StatusWont fix
PackageHTML_Template_Flexy
PHP Version4.3.8
OSLinux
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.