Documentation
¶
Index ¶
- Constants
- func NewRepeater(opts RepeaterOptions) *fieldRepeater
- type Field
- func (field *Field) BuildFormGroup(fileManagerURL string) *hb.Tag
- func (field *Field) GetHelp() string
- func (field *Field) GetID() string
- func (field *Field) GetLabel() string
- func (field *Field) GetName() string
- func (field *Field) GetOptions() []FieldOption
- func (field *Field) GetOptionsF() func() []FieldOption
- func (field *Field) GetRequired() bool
- func (field *Field) GetType() string
- func (field *Field) GetValue() string
- func (field *Field) IsBlockEditor() bool
- func (field *Field) IsDate() bool
- func (field *Field) IsDateTime() bool
- func (field *Field) IsDisabled() bool
- func (field *Field) IsHidden() bool
- func (field *Field) IsHtmlArea() bool
- func (field *Field) IsImage() bool
- func (field *Field) IsNumber() bool
- func (field *Field) IsPassword() bool
- func (field *Field) IsRaw() bool
- func (field *Field) IsReadonly() bool
- func (field *Field) IsRequired() bool
- func (field *Field) IsSelect() bool
- func (field *Field) IsString() bool
- func (field *Field) IsTable() bool
- func (field *Field) IsTextArea() bool
- func (field *Field) SetHelp(fieldHelp string)
- func (field *Field) SetID(fieldID string)
- func (field *Field) SetLabel(fieldLabel string)
- func (field *Field) SetName(fieldName string)
- func (field *Field) SetOptions(fieldOptions []FieldOption)
- func (field *Field) SetOptionsF(fieldOptionsF func() []FieldOption)
- func (field *Field) SetRequired(fieldRequired bool)
- func (field *Field) SetType(fieldType string)
- func (field *Field) SetValue(fieldValue string)
- func (field *Field) TrumbowygScript() string
- type FieldInterface
- type FieldOption
- type FieldOptions
- type Form
- type FormOptions
- type RepeaterOptions
- type TableColumn
- type TableOptions
Constants ¶
View Source
const FORM_FIELD_TYPE_BLOCKEDITOR = "blockeditor"
View Source
const FORM_FIELD_TYPE_DATE = "date"
View Source
const FORM_FIELD_TYPE_DATETIME = "datetime"
View Source
const FORM_FIELD_TYPE_HIDDEN = "hidden"
View Source
const FORM_FIELD_TYPE_HTMLAREA = "htmlarea"
View Source
const FORM_FIELD_TYPE_IMAGE = "image"
View Source
const FORM_FIELD_TYPE_NUMBER = "number"
View Source
const FORM_FIELD_TYPE_PASSWORD = "password"
View Source
const FORM_FIELD_TYPE_RAW = "raw"
View Source
const FORM_FIELD_TYPE_SELECT = "select"
View Source
const FORM_FIELD_TYPE_STRING = "string"
View Source
const FORM_FIELD_TYPE_TABLE = "table"
View Source
const FORM_FIELD_TYPE_TEXTAREA = "textarea"
Variables ¶
This section is empty.
Functions ¶
func NewRepeater ¶
func NewRepeater(opts RepeaterOptions) *fieldRepeater
Types ¶
type Field ¶
type Field struct {
ID string // automatic, if not assigned
Type string
Name string
Label string
Help string
Options []FieldOption
OptionsF func() []FieldOption
Value string
Required bool
Readonly bool
Disabled bool
TableOptions TableOptions
// BlockEditorOptions BlockEditorOptions
Placeholder string
Invisible bool
CustomInput hb.TagInterface
}
func NewField ¶
func NewField(opts FieldOptions) *Field
func (*Field) GetOptions ¶
func (field *Field) GetOptions() []FieldOption
func (*Field) GetOptionsF ¶
func (field *Field) GetOptionsF() func() []FieldOption
func (*Field) GetRequired ¶
func (*Field) IsBlockEditor ¶
func (*Field) IsDateTime ¶
func (*Field) IsDisabled ¶
func (*Field) IsHtmlArea ¶
func (*Field) IsPassword ¶
func (*Field) IsReadonly ¶
func (*Field) IsRequired ¶
func (*Field) IsTextArea ¶
func (*Field) SetOptions ¶
func (field *Field) SetOptions(fieldOptions []FieldOption)
func (*Field) SetOptionsF ¶
func (field *Field) SetOptionsF(fieldOptionsF func() []FieldOption)
func (*Field) SetRequired ¶
func (*Field) TrumbowygScript ¶
type FieldInterface ¶
type FieldInterface interface {
GetID() string
SetID(fieldID string)
GetLabel() string
SetLabel(fieldLabel string)
GetName() string
SetName(fieldName string)
GetHelp() string
SetHelp(fieldName string)
GetOptions() []FieldOption
SetOptions(fieldOptions []FieldOption)
GetOptionsF() func() []FieldOption
SetOptionsF(fieldOptionsF func() []FieldOption)
GetRequired() bool
SetRequired(fieldRequired bool)
GetType() string
SetType(fieldType string)
GetValue() string
SetValue(fieldValue string)
BuildFormGroup(fileManagerURL string) *hb.Tag
// contains filtered or unexported methods
}
type FieldOption ¶
type FieldOptions ¶
type FieldOptions struct {
ID string // automatic, if not assigned
Type string
Name string
Label string
Help string
Options []FieldOption
OptionsF func() []FieldOption
Value string
Required bool
Readonly bool
Disabled bool
TableOptions TableOptions
Placeholder string
Invisible bool
CustomInput hb.TagInterface
}
type Form ¶
type Form struct {
// contains filtered or unexported fields
}
func NewForm ¶
func NewForm(opts FormOptions) *Form
func (*Form) AddField ¶
func (form *Form) AddField(field FieldInterface)
func (*Form) GetFields ¶
func (form *Form) GetFields() []FieldInterface
func (*Form) GetFileManagerURL ¶
func (*Form) SetFields ¶
func (form *Form) SetFields(fields []FieldInterface)
func (*Form) SetFileManagerURL ¶
type FormOptions ¶
type RepeaterOptions ¶
type TableColumn ¶
type TableOptions ¶
Click to show internal directories.
Click to hide internal directories.