FAQ
Edit report at https://pear.php.net/bugs/bug.php?id=19097&edit=1

ID: 19097
Updated by: borz_off@cs.msu.su
Reported By: jsnell at e-normous dot com
Summary: HTML_QuickForm2 does not generate valid html
-Status: Analyzed
+Status: Assigned
Type: Feature/Change Request
Package: HTML_QuickForm2
Operating System: Linux
Package Version: 0.6.1
PHP Version: 5.3.8
-Assigned To:
+Assigned To: avb
Roadmap Versions:
New Comment:

-Status: Analyzed
+Status: Assigned
-Assigned To:
+Assigned To: avb
Clarification: IDs starting with underscores are allowed in XHTML but
disallowed in HTML4. These are fixed in SVN.

I'm not sure where exactly are empty label tags disallowed, though. Will
do some more checks.


Previous Comments:
------------------------------------------------------------------------

[2011-12-03 10:37:31] avb

-Status: Open
+Status: Analyzed
There is a valid report here that our autogenerated IDs start with
underscores, this is not allowed in XHTML. I already had that one
reported privately.

As for empty <label></label> tags, this can be easily fixed if one sets
up custom templates for label-less elements. So this is more a
documentation problem, see also bug #18787 for example.

------------------------------------------------------------------------

[2011-12-03 09:20:55] mansion

Hi,

I don't understand your bug report, what do you want exactly ?

Furthermore, it seems you are trying to report 2 bugs in one. Please
make one bug
report per issue and provide the test case for your underscore issue as
well. Thanks.

------------------------------------------------------------------------

[2011-12-03 01:39:23] doconnor

https://gist.github.com/1425533

------------------------------------------------------------------------

[2011-12-02 18:16:26] ftzdomino

Description:
------------
HTML_QuickForm2 generates empty <label></label> tags and its
ID values sometimes start with an underscore, which is not
allowed.

IDs should not be prefixed with _ and empty labels should either
be omitted or filled with an Â


Test script:
---------------
require("/usr/share/php/HTML/QuickForm2.php");
$f = new HTML_QuickForm2("form_name");
$f->addElement("checkbox", "test");
echo $f;


Expected result:
----------------
<div class="quickform"><form method="post" id="form_name"
action="-"><div><input type="hidden"
name="_qf__form_name" id="qf__form_name-0" />
<div class="row"><label for="test-0" class="element">Â
</label><div class="element"><input type="checkbox"
name="test" id="test-0" value="1" /></div></div></div>
</form></div>

Actual result:
--------------
<div class="quickform"><form method="post" id="form_name"
action="-"><div><input type="hidden"
name="_qf__form_name" id="_qf__form_name-0" />
<div class="row"><label for="test-0" class="element"></label>
<div class="element"><input type="checkbox" name="test"
id="test-0" value="1" /></div></div></div></form></div>

------------------------------------------------------------------------

Search Discussions

  • Borz_off at Feb 28, 2012 at 5:24 pm
    Edit report at https://pear.php.net/bugs/bug.php?id=19097&edit=1

    ID: 19097
    Updated by: borz_off@cs.msu.su
    Reported By: jsnell at e-normous dot com
    Summary: HTML_QuickForm2 does not generate valid html
    -Status: Assigned
    +Status: Closed
    Type: Feature/Change Request
    Package: HTML_QuickForm2
    Operating System: Linux
    Package Version: 0.6.1
    PHP Version: 5.3.8
    Assigned To: avb
    Roadmap Versions:
    New Comment:

    -Status: Assigned
    +Status: Closed
    This bug has been fixed in SVN.

    If this was a documentation problem, the fix will appear on pear.php.net
    by the end of next Sunday (CET).

    If this was a problem with the pear.php.net website, the change should
    be live shortly.

    Otherwise, the fix will appear in the package's next release.

    Thank you for the report and for helping us make PEAR better.

    --

    Added a paragraph tag and a template block around label, this will allow
    removing empty label tags without breaking layout.


    Previous Comments:
    ------------------------------------------------------------------------

    [2012-02-19 20:31:57] avb

    -Status: Analyzed
    +Status: Assigned
    -Assigned To:
    +Assigned To: avb
    Clarification: IDs starting with underscores are allowed in XHTML but
    disallowed in HTML4. These are fixed in SVN.

    I'm not sure where exactly are empty label tags disallowed, though. Will
    do some more checks.

    ------------------------------------------------------------------------

    [2011-12-03 10:37:31] avb

    -Status: Open
    +Status: Analyzed
    There is a valid report here that our autogenerated IDs start with
    underscores, this is not allowed in XHTML. I already had that one
    reported privately.

    As for empty <label></label> tags, this can be easily fixed if one sets
    up custom templates for label-less elements. So this is more a
    documentation problem, see also bug #18787 for example.

    ------------------------------------------------------------------------

    [2011-12-03 09:20:55] mansion

    Hi,

    I don't understand your bug report, what do you want exactly ?

    Furthermore, it seems you are trying to report 2 bugs in one. Please
    make one bug
    report per issue and provide the test case for your underscore issue as
    well. Thanks.

    ------------------------------------------------------------------------

    [2011-12-03 01:39:23] doconnor

    https://gist.github.com/1425533

    ------------------------------------------------------------------------

    [2011-12-02 18:16:26] ftzdomino

    Description:
    ------------
    HTML_QuickForm2 generates empty <label></label> tags and its
    ID values sometimes start with an underscore, which is not
    allowed.

    IDs should not be prefixed with _ and empty labels should either
    be omitted or filled with an Â


    Test script:
    ---------------
    require("/usr/share/php/HTML/QuickForm2.php");
    $f = new HTML_QuickForm2("form_name");
    $f->addElement("checkbox", "test");
    echo $f;


    Expected result:
    ----------------
    <div class="quickform"><form method="post" id="form_name"
    action="-"><div><input type="hidden"
    name="_qf__form_name" id="qf__form_name-0" />
    <div class="row"><label for="test-0" class="element">Â
    </label><div class="element"><input type="checkbox"
    name="test" id="test-0" value="1" /></div></div></div>
    </form></div>

    Actual result:
    --------------
    <div class="quickform"><form method="post" id="form_name"
    action="-"><div><input type="hidden"
    name="_qf__form_name" id="_qf__form_name-0" />
    <div class="row"><label for="test-0" class="element"></label>
    <div class="element"><input type="checkbox" name="test"
    id="test-0" value="1" /></div></div></div></form></div>

    ------------------------------------------------------------------------


    --
    Edit this bug report at https://pear.php.net/bugs/bug.php?id=19097&edit=1

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedFeb 19, '12 at 7:30p
activeFeb 28, '12 at 5:24p
posts2
users1
websitepear.php.net

1 user in discussion

Borz_off: 2 posts

People

Translate

site design / logo © 2022 Grokbase