Added enum field support in the ui.

This commit is contained in:
mikestefanello 2025-04-14 20:34:31 -04:00
parent aacb3d358f
commit 53113101c9
4 changed files with 58 additions and 12 deletions

View file

@ -31,13 +31,13 @@ func (f *Contact) Render(r *ui.Request) Node {
Label: "Email address",
Value: f.Email,
}),
Radios(RadiosParams{
Radios(OptionsParams{
Form: f,
FormField: "Department",
Name: "department",
Label: "Department",
Value: f.Department,
Options: []Radio{
Options: []Choice{
{Value: "sales", Label: "Sales"},
{Value: "marketing", Label: "Marketing"},
{Value: "hr", Label: "HR"},