Add initial data from request.GET to script forms #3851
Labels
status: accepted
This issue has been accepted for implementation
type: feature
Introduction of new functionality to the application
Environment
Proposed Functionality
Most NetBox forms are passed
initial=request.GET
to the constructor so that the request can pass initial values to the form. The extra/scrips functionality doesn't do that. I propose to add it to make forms behaviour consistent.Use Case
I have a script that requires the user to select a device. With
initial=request.GET
I would be able to create a custom link from the device page with URL/extras/scripts/example/demo/?router={{ obj.id }}
so that a user can easily click from the device page to the script page with the correct device pre-selected.Database Changes
None
External Dependencies
None
As usual I'll implement this myself once accepted.
The text was updated successfully, but these errors were encountered: