Should django-uni-form handle boilerplate HTML?
This was originally posted on blogger here.
This is in regards to my django-uni-form project, which lets you do proper fieldset forms in Django, letting you do prettily formatted forms that meet the Section 508 specification, not to mention various accessibility and usability guidelines.
Basically, I think django-uni-form could be a little more helpful. So what do I mean?
Standard uni-form looks like:
django-uni-form gives just:<form class="login uniForm" method="POST" action=""> <fieldset class="inlineLabels"> <legend>_ Required fields</legend> <div class="ctrlHolder "> <label for="id_username"> _ User Name</label> <input id="id_username" type="text" name="username" maxlength="30" /> </div> </legend> </fieldset> <div class="buttonHolder"> <button type="reset" class="resetButton">Reset</button> <button type="submit" class="primaryAction">Submit</button> </div> </form>
Does it make sense for django-uni-form to provide the following?<div class="ctrlHolder "> <label for="id_username"> _ User Name</label> <input id="id_username" type="text" name="username" maxlength="30" /> </div>
With this, you can still add in buttons elegantly. Thoughts?<fieldset class="inlineLabels"> <legend>_ Required fields</legend> <div class="ctrlHolder "> <label for="id_username"> * User Name</label> <input id="id_username" type="text" name="username" maxlength="30" /> </div> </legend> </fieldset>
Update: I'm working with James Tauber and perhaps some others to figure out the best way to make this work.
Tags: django forms pinax legacy-blogger