cbform

package
v0.10.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {
	// contains filtered or unexported fields
}

func New

func New(fields ...Field) *Container

func (*Container) GetField

func (c *Container) GetField(fieldName string) *Field

type Field

type Field struct {
	Name                string
	Type                string
	Placeholder         string
	Label               string
	JsValidationError   string
	JsValidationSuccess string
	Error               error
	Help                string
	Value               interface{}
	Options             []*Option
}

func (*Field) GetError

func (f *Field) GetError() string

func (*Field) GetHelp

func (f *Field) GetHelp() string

func (*Field) GetIntValue added in v0.8.0

func (f *Field) GetIntValue() (int, error)

func (*Field) GetJsValidationError

func (f *Field) GetJsValidationError() string

func (*Field) GetJsValidationSuccess

func (f *Field) GetJsValidationSuccess() string

func (*Field) GetLabel

func (f *Field) GetLabel() string

func (*Field) GetName

func (f *Field) GetName() string

func (*Field) GetOptions added in v0.7.0

func (f *Field) GetOptions() []*Option

func (*Field) GetPlaceholder

func (f *Field) GetPlaceholder() string

func (*Field) GetStringValue added in v0.8.0

func (f *Field) GetStringValue() string

func (*Field) GetType

func (f *Field) GetType() string

func (*Field) GetValue

func (f *Field) GetValue() interface{}

func (*Field) HasError

func (f *Field) HasError() bool

func (*Field) HasLabel added in v0.7.0

func (f *Field) HasLabel() bool

type Option added in v0.7.0

type Option struct {
	Disabled bool
	Selected bool
	Label    string
	Value    interface{}
}

func (*Option) GetLabel added in v0.7.0

func (f *Option) GetLabel() string

func (*Option) GetValue added in v0.7.0

func (f *Option) GetValue() interface{}

func (*Option) IsDisabled added in v0.7.0

func (f *Option) IsDisabled() bool

func (*Option) IsSelected added in v0.7.0

func (f *Option) IsSelected() bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL