hidden form fields get labels and td tags when rendered

Bug #329247 reported by malte
2
Affects Status Importance Assigned to Milestone
web.py
Fix Released
Medium
Anand Chitipothu

Bug Description

web.py renders hidden fields with labels, td-tags and other markup html that should be used for all other form fields except for hidden fields, which should be just by themselves.

The attached patch fixes the issue.

Revision history for this message
malte (alexander-polkabrothers) wrote :
Aaron Swartz (aaronsw)
Changed in webpy:
assignee: nobody → anandology
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Anand Chitipothu (anandology) wrote :

The above fix adds <input> element in between table rows, which is not valid HTML.

The right fix should be:

<tr style="display: none"><td><input type="hidden" name="x" value="y"/></td></tr>

Revision history for this message
Anand Chitipothu (anandology) wrote :

Fixed.

>>> f = Form(Hidden("x", value="a"))
>>> print f.render()
<table>
    <tr style="display: none;"><th></th><td><input type="hidden" id="x" value="a" name="x"/></td></tr>
</table>

Changed in webpy:
milestone: none → 0.33
status: Confirmed → Fix Committed
Changed in webpy:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.