Documentation ¶
Index ¶
Constants ¶
View Source
const ( FieldSelect string = "Select" FieldEmail string = "Email" FieldInput string = "Input" FieldPassword string = "Password" FieldTextArea string = "TextArea" FieldSwitch string = "Switch" FieldCheckbox string = "Checkbox" FieldRadioButton string = "RadioButton" FieldConsole string = "Console" FieldButton string = "Button" ValidatorDigitsOnly string = "digitsOnly" ButtonSubmit string = "Submit" ButtonCancel string = "Cancel" ButtonDialogClose string = "CloseDialog" ButtonDialogOk string = "OkDialog" )
GenericField holds common field properties.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Field ¶
type Field interface {
GetType() string
}
Field is an interface that all specific field types implement.
type Form ¶
type Form struct { Title string `json:"title"` Description string `json:"description"` Fields [][]FormField `json:"fields"` }
func (*Form) UnmarshalJSON ¶
UnmarshalJSON custom unmarshals JSON data into a Form.
type FormField ¶
type FormField struct { Key string `json:"key"` Type string `json:"type"` Label string `json:"label,omitempty"` LabelHidden bool `json:"labelHidden"` Required bool `json:"required,omitempty"` Placeholder string `json:"placeholder,omitempty"` Readonly bool `json:"readonly,omitempty"` Value string `json:"value"` Validator string `json:"validator,omitempty"` Items []SelectItem `json:"items,omitempty"` Lines int `json:"lines,omitempty"` }
FormField extends GenericField with additional common properties.
type InputField ¶
type SelectItem ¶
Click to show internal directories.
Click to hide internal directories.