chg: add multi column fields and allow button inside form
This commit is contained in:
@@ -21,6 +21,7 @@ const (
|
||||
FieldCheckbox string = "Checkbox"
|
||||
FieldRadioButton string = "RadioButton"
|
||||
FieldConsole string = "Console"
|
||||
FieldButton string = "Button"
|
||||
ValidatorDigitsOnly string = "digitsOnly"
|
||||
|
||||
Button_Ok string = "Ok"
|
||||
@@ -59,10 +60,10 @@ type SelectItem struct {
|
||||
}
|
||||
|
||||
type Form struct {
|
||||
Title string `json:"title"`
|
||||
Description string `json:"description"`
|
||||
Fields []FormField `json:"fields"`
|
||||
Buttons []string `json:"buttons"`
|
||||
Title string `json:"title"`
|
||||
Description string `json:"description"`
|
||||
Fields [][]FormField `json:"fields"`
|
||||
Buttons []string `json:"buttons"`
|
||||
}
|
||||
|
||||
func (f *Form) ToJSON() string {
|
||||
@@ -71,6 +72,7 @@ func (f *Form) ToJSON() string {
|
||||
fmt.Println("Error encoding to JSON:", err)
|
||||
return ""
|
||||
}
|
||||
|
||||
return (string(formJson))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user