-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
status: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application
Description
NetBox version
v3.3.7
Python version
3.9
Steps to Reproduce
- create a form that uses the render_field and provides a custom label
- {% render_field form.provider_network_provider label="Provider" %}
- Open the page.
Expected Behavior
The custom label is shown in front of the widgets
Observed Behavior
The original fieldname is shown, and not the custom label.
| def render_field(field, bulk_nullable=False, label=None): |
allows to set a 'label' and returns it as a separate variable to the "form_helpers/render_field.html"
This form however always uses the 'field.label' and not the 'label' variable
There is a reference to the 'label' variable, but only for textarea's
Can we have the 'label' parameter always be displayed ?
My suggestion is to set the 'label' variable to the 'field.label' in 'def render_field' and then in the html always refer to label, rather than field.label
Metadata
Metadata
Assignees
Labels
status: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application