diff --git a/example/main.go b/example/main.go
index 014868e..5865fe2 100644
--- a/example/main.go
+++ b/example/main.go
@@ -12,8 +12,9 @@ var inputTpl = `
{{ if eq .Type "dropdown" }}
{{ else if eq .Type "checkbox" }}
@@ -79,8 +80,9 @@ func main() {
State: "NY",
Zip: "11765",
},
- CheckBox: true,
- CheckBox2: false,
+ InputTypes: form.InputFieldTypeEmail,
+ CheckBox: true,
+ CheckBox2: false,
},
Errors: []form.FieldError{
fieldError{
diff --git a/fields.go b/fields.go
index 34e3548..669540b 100644
--- a/fields.go
+++ b/fields.go
@@ -40,11 +40,9 @@ func (i InputFieldType) Enum() []any {
}
type FieldValue struct {
- Id string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Value string `json:"value,omitempty"`
Disabled bool `json:"disabled,omitempty"`
- Group string `json:"group,omitempty"`
}
type FormField struct {
diff --git a/transformer.go b/transformer.go
index 12c78ea..3f58644 100644
--- a/transformer.go
+++ b/transformer.go
@@ -80,7 +80,7 @@ func (t *Transformer) scanModel(rValue reflect.Value, rType reflect.Type, names
var fieldValue []FieldValue
for _, v := range enums {
fieldValue = append(fieldValue, FieldValue{
- Id: fmt.Sprint(v),
+ Value: fmt.Sprint(v),
Name: fmt.Sprint(v),
Disabled: false,
})