-
-
Notifications
You must be signed in to change notification settings - Fork 93
Closed
Labels
approvedThis feature request will be implementedThis feature request will be implementedenhancementA new feature requestA new feature requesthigh priorityThis issue should be resolved quicklyThis issue should be resolved quickly
Milestone
Description
Describe the feature
I'd like a string field in a form struct to be rendered as a Chooser.
I've had a quick dig through the code and it doesn't seem possible as things stand. Essentially this equates to a larger feature request, that form field widgets can be specified via struct tags where appropriate (and in this case, enum values provided).
Code below is indicitive of what I'd like to be possible.
Relevant code
type MyStruct struct {
SomeField string `widget:"chooser" values:"foo,bar,baz"`
}
form := core.NewForm(someFrame)
form.SetStruct(&MyStruct{}) // SomeField is rendered as a Chooser with available values of foo, bar, bazMetadata
Metadata
Assignees
Labels
approvedThis feature request will be implementedThis feature request will be implementedenhancementA new feature requestA new feature requesthigh priorityThis issue should be resolved quicklyThis issue should be resolved quickly
Type
Projects
Status
Done