-
Notifications
You must be signed in to change notification settings - Fork 123
Open
Description
Django form widgets automatically render an ID attribute on an INPUT tag. Your widget adds a duplicate ID attribute to the outer wrapping DIV. Since IDs should be unique, this violates the HTML spec, and can cause errors when attempting to use javascript/jquery to access the form fields via ID.
Here is an example of the output. Note that the IDs on both the DIV and the INPUT are the same.
<div id="id_date" class="input-group date">
<input class="form-control" id="id_date" name="date" type="text">
<span class="input-group-addon"><span class="glyphicon glyphicon-remove"></span></span>
<span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
</div>
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels