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

ID: 19097
Updated by: daniel.oconnor@gmail.com
Reported By: jsnell at e-normous dot com
Summary: HTML_QuickForm2 does not generate valid html
Status: Open
Type: Feature/Change Request
Package: HTML_QuickForm2
Operating System: Linux
Package Version: 0.6.1
PHP Version: 5.3.8
Roadmap Versions:
New Comment:

https://gist.github.com/1425533


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

[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

  • Php at Dec 3, 2011 at 8:21 am
    Edit report at https://pear.php.net/bugs/bug.php?id=19097&edit=1

    ID: 19097
    Updated by: php@mamasam.net
    Reported By: jsnell at e-normous dot com
    Summary: HTML_QuickForm2 does not generate valid html
    Status: Open
    Type: Feature/Change Request
    Package: HTML_QuickForm2
    Operating System: Linux
    Package Version: 0.6.1
    PHP Version: 5.3.8
    Roadmap Versions:
    New Comment:

    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.


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

    [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>

    ------------------------------------------------------------------------
  • Borz_off at Dec 3, 2011 at 9:37 am
    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: Open
    +Status: Analyzed
    Type: Feature/Change Request
    Package: HTML_QuickForm2
    Operating System: Linux
    Package Version: 0.6.1
    PHP Version: 5.3.8
    Roadmap Versions:
    New Comment:

    -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.


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

    [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>

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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedDec 3, '11 at 12:39a
activeDec 3, '11 at 9:37a
posts3
users3
websitepear.php.net

3 users in discussion

Borz_off: 1 post Daniel Oconnor: 1 post Php: 1 post

People

Translate

site design / logo © 2022 Grokbase