Dropdown widgets for required fields should not include a "clear" button #10920

Closed
opened 2025-12-29 21:37:43 +01:00 by adam · 0 comments
Owner

Originally created by @jeremystretch on GitHub (Mar 19, 2025).

Originally assigned to: @jeremystretch on GitHub.

Deployment Type

NetBox Cloud

NetBox Version

v4.2.5

Python Version

3.10

Steps to Reproduce

In many forms (the site edit form, for instance), required choice fields include a "clear" button (an X within a circle) toward the righthand side of the field which clears any selected value.

Image

Expected Behavior

It should not be possible to clear the selected value of a field for which a value must be specified. The presence of the "clear" button may be confusing to the user.

The clear button is a Tom Select plugin. It can be disabled for required fields by altering the logic here.

Observed Behavior

See above.

Originally created by @jeremystretch on GitHub (Mar 19, 2025). Originally assigned to: @jeremystretch on GitHub. ### Deployment Type NetBox Cloud ### NetBox Version v4.2.5 ### Python Version 3.10 ### Steps to Reproduce In many forms (the site edit form, for instance), required choice fields include a "clear" button (an X within a circle) toward the righthand side of the field which clears any selected value. ![Image](https://github.com/user-attachments/assets/cad296b5-282b-4980-92c8-1d6a008a0851) ### Expected Behavior It should not be possible to clear the selected value of a field for which a value must be specified. The presence of the "clear" button may be confusing to the user. The clear button is a [Tom Select plugin](https://tom-select.js.org/plugins/clear-button/). It can be disabled for required fields by altering the logic [here](https://github.com/netbox-community/netbox/blob/43840e6a72416a5e0c963b230f9471308a29e3e1/netbox/project-static/src/select/config.ts#L8-L12). ### Observed Behavior See above.
adam added the type: bugstatus: acceptedseverity: low labels 2025-12-29 21:37:43 +01:00
adam closed this issue 2025-12-29 21:37:43 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10920