newforms produces invalid XHTML with hidden fields
|Reported by:||Owned by:||Adrian Holovaty|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Based on the unit tests around line 1769 in source:/django/trunk/tests/regressiontests/forms/tests.py Django's newforms produce invalid XHTML.
The only elements allowed under a <table> tag are <thead>, <tbody>, and <tr>.
I am unsure of a concrete solution to this. If the hidden field isn't the last field, rendering can be delayed until the next rendered <td> tag (the next label). In the case that the hidden fields are last, perhaps insert them at the end of the last <td> rendered or render an empty row, although that is less-than-ideal.