id_for_label(self, id_)
[source]
Returns the HTML ID attribute of this widget for use by a <label>
, given the ID of the field. Returns None
if an ID isn’t available.
This hook is necessary because some widgets have multiple HTML elements and, thus, multiple IDs. In that case, this method should return an ID value that corresponds to the first ID in the widget’s tags.
Please login to continue.