summaryrefslogtreecommitdiff
path: root/django/forms
diff options
context:
space:
mode:
Diffstat (limited to 'django/forms')
-rw-r--r--django/forms/boundfield.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/forms/boundfield.py b/django/forms/boundfield.py
index 2ff8b0ee26..a061f15f87 100644
--- a/django/forms/boundfield.py
+++ b/django/forms/boundfield.py
@@ -277,7 +277,7 @@ class BoundWidget:
@property
def id_for_label(self):
- return 'id_%s_%s' % (self.data['name'], self.data['index'])
+ return self.data['attrs'].get('id')
@property
def choice_label(self):