options

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2025 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMultiSelectInput

func NewMultiSelectInput(attrs map[string]string, choices func() []widgets.Option) widgets.Widget

Types

type MultiSelectWidget

type MultiSelectWidget struct {
	*OptionsWidget
}

func (*MultiSelectWidget) Media

func (m *MultiSelectWidget) Media() media.Media

func (*MultiSelectWidget) ValueFromDataDict

func (m *MultiSelectWidget) ValueFromDataDict(data url.Values, files map[string][]filesystem.FileHeader, name string) (interface{}, []error)

type OptionsWidget

type OptionsWidget struct {
	*widgets.BaseWidget
	Choices      func() []widgets.Option
	IncludeBlank bool
	BlankLabel   string
}

func NewCheckboxInput

func NewCheckboxInput(attrs map[string]string, choices func() []widgets.Option) *OptionsWidget

func NewOptionWidget

func NewOptionWidget(type_ string, templateName string, attrs map[string]string, choices func() []widgets.Option) *OptionsWidget

func NewRadioInput

func NewRadioInput(attrs map[string]string, choices func() []widgets.Option) *OptionsWidget

func NewSelectInput

func NewSelectInput(attrs map[string]string, choices func() []widgets.Option) *OptionsWidget

func (*OptionsWidget) GetContextData

func (o *OptionsWidget) GetContextData(id, name string, value interface{}, attrs map[string]string) ctx.Context

func (*OptionsWidget) Render

func (b *OptionsWidget) Render(w io.Writer, id, name string, value interface{}, attrs map[string]string) error

func (*OptionsWidget) RenderWithErrors

func (b *OptionsWidget) RenderWithErrors(w io.Writer, id, name string, value interface{}, errors []error, attrs map[string]string) error

func (*OptionsWidget) Validate

func (o *OptionsWidget) Validate(value interface{}) []error

Jump to

Keyboard shortcuts

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