widget

package
v0.25.14 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UseAll

func UseAll()

Types

type CheckButton added in v0.23.5

type CheckButton struct{}

CheckButton renders a fancy checkbox widget that looks like a button

func (CheckButton) Edit added in v0.23.5

func (widget CheckButton) Edit(f *form.Form, e *form.Element, _ form.LookupProvider, value any, b *html.Builder) error

func (CheckButton) Encoding added in v0.23.5

func (widget CheckButton) Encoding(_ *form.Element) string

func (CheckButton) ShowDescriptions added in v0.25.12

func (widget CheckButton) ShowDescriptions() string

ShowDescriptions is a part of the Widget interface. It returns the position of the description for this widget, which is either "TOP", "BOTTOM", or "NONE".

func (CheckButton) ShowLabels added in v0.23.5

func (widget CheckButton) ShowLabels() bool

func (CheckButton) View added in v0.23.5

func (widget CheckButton) View(_ *form.Form, _ *form.Element, _ form.LookupProvider, _ any, _ *html.Builder) error

type CheckButtonGroup added in v0.23.5

type CheckButtonGroup struct{}

CheckButtonGroup renders a group of fancy checkboxes that look like buttons

func (CheckButtonGroup) Edit added in v0.23.5

func (widget CheckButtonGroup) Edit(f *form.Form, e *form.Element, provider form.LookupProvider, value any, b *html.Builder) error

func (CheckButtonGroup) Encoding added in v0.23.5

func (widget CheckButtonGroup) Encoding(_ *form.Element) string

func (CheckButtonGroup) ShowDescriptions added in v0.25.12

func (widget CheckButtonGroup) ShowDescriptions() string

ShowDescriptions is a part of the Widget interface. It returns the position of the description for this widget, which is either "TOP", "BOTTOM", or "NONE".

func (CheckButtonGroup) ShowLabels added in v0.23.5

func (widget CheckButtonGroup) ShowLabels() bool

func (CheckButtonGroup) View added in v0.23.5

func (widget CheckButtonGroup) View(f *form.Form, e *form.Element, provider form.LookupProvider, value any, b *html.Builder) error

type Checkbox

type Checkbox struct{}

Checkbox is a widget that creates a set of checkbox input fields.

func (Checkbox) Edit

func (widget Checkbox) Edit(form *form.Form, e *form.Element, provider form.LookupProvider, value any, b *html.Builder) error

Edit is a part of the Widget interface. It builds the HTML for editing this element.

func (Checkbox) Encoding

func (widget Checkbox) Encoding(_ *form.Element) string

Encoding is a part of the Widget interface. It returns the encoding type for this widget. For Checkbox widgets, there is no special encoding, so this always returns an empty string.

func (Checkbox) ShowDescriptions added in v0.25.12

func (widget Checkbox) ShowDescriptions() string

ShowDescriptions is a part of the Widget interface. It returns the position of the description for this widget, which is either "TOP", "BOTTOM", or "NONE".

func (Checkbox) ShowLabels

func (widget Checkbox) ShowLabels() bool

ShowLabels is a part of the Widget interface. It returns TRUE if this widget requires labels to be displayed around it. For Checkbox widgets, labels are not shown, so this always returns FALSE.

func (Checkbox) View

func (widget Checkbox) View(f *form.Form, e *form.Element, provider form.LookupProvider, value any, b *html.Builder) error

View is a part of the Widget interface. It builds the HTML for viewing this element.

type Colorpicker added in v0.22.3

type Colorpicker struct{}

Colorpicker is a widget that creates a color picker input field.

func (Colorpicker) Edit added in v0.22.3

func (widget Colorpicker) Edit(f *form.Form, e *form.Element, _ form.LookupProvider, value any, b *html.Builder) error

Edit generates the HTML for editing a color picker input field.

func (Colorpicker) Encoding added in v0.22.3

func (widget Colorpicker) Encoding(_ *form.Element) string

Encoding is a part of the Widget interface. It returns the encoding type for this widget. For Colorpicker widgets, there is no special encoding, so this always returns an empty string.

func (Colorpicker) ShowDescriptions added in v0.25.12

func (widget Colorpicker) ShowDescriptions() string

ShowDescriptions is a part of the Widget interface. It returns the position of the description for this widget, which is either "TOP", "BOTTOM", or "NONE".

func (Colorpicker) ShowLabels added in v0.22.3

func (widget Colorpicker) ShowLabels() bool

ShowLabels is a part of the Widget interface. It returns TRUE if this widget requires labels to be displayed around it. For Colorpicker widgets, labels are shown, so this always returns TRUE.

func (Colorpicker) View added in v0.22.3

func (widget Colorpicker) View(f *form.Form, e *form.Element, _ form.LookupProvider, value any, b *html.Builder) error

View generates the HTML for viewing a color picker value.

type Container added in v0.25.10

type Container struct{}

func (Container) Edit added in v0.25.10

func (Container) Edit(f *form.Form, e *form.Element, provider form.LookupProvider, value any, b *html.Builder) error

func (Container) Encoding added in v0.25.10

func (widget Container) Encoding(element *form.Element) string

func (Container) ShowDescriptions added in v0.25.12

func (widget Container) ShowDescriptions() string

ShowDescriptions is a part of the Widget interface. It returns the position of the description for this widget, which is either "TOP", "BOTTOM", or "NONE".

func (Container) ShowLabels added in v0.25.10

func (Container) ShowLabels() bool

func (Container) View added in v0.25.10

func (Container) View(f *form.Form, e *form.Element, provider form.LookupProvider, value any, b *html.Builder) error

type DatePicker added in v0.21.0

type DatePicker struct{}

func (DatePicker) Edit added in v0.21.0

func (widget DatePicker) Edit(f *form.Form, e *form.Element, _ form.LookupProvider, value any, b *html.Builder) error

func (DatePicker) Encoding added in v0.21.0

func (widget DatePicker) Encoding(_ *form.Element) string

func (DatePicker) ShowDescriptions added in v0.25.12

func (widget DatePicker) ShowDescriptions() string

ShowDescriptions is a part of the Widget interface. It returns the position of the description for this widget, which is either "TOP", "BOTTOM", or "NONE".

func (DatePicker) ShowLabels added in v0.21.0

func (widget DatePicker) ShowLabels() bool

func (DatePicker) View added in v0.21.0

func (widget DatePicker) View(f *form.Form, e *form.Element, _ form.LookupProvider, value any, b *html.Builder) error

type DateTimePicker added in v0.22.17

type DateTimePicker struct{}

func (DateTimePicker) Edit added in v0.22.17

func (widget DateTimePicker) Edit(f *form.Form, e *form.Element, _ form.LookupProvider, value any, b *html.Builder) error

func (DateTimePicker) Encoding added in v0.22.17

func (widget DateTimePicker) Encoding(_ *form.Element) string

Encoding is a part of the Widget interface. It returns the encoding type for this widget. For DateTimePicker widgets, there is no special encoding, so this always returns an empty string.

func (DateTimePicker) ShowDescriptions added in v0.25.12

func (widget DateTimePicker) ShowDescriptions() string

ShowDescriptions is a part of the Widget interface. It returns the position of the description for this widget, which is either "TOP", "BOTTOM", or "NONE".

func (DateTimePicker) ShowLabels added in v0.22.17

func (widget DateTimePicker) ShowLabels() bool

ShowLabels is a part of the Widget interface. It returns TRUE if this widget requires labels to be displayed around it. For DateTimePicker widgets, labels are shown, so this always returns TRUE.

func (DateTimePicker) View added in v0.22.17

func (widget DateTimePicker) View(f *form.Form, e *form.Element, _ form.LookupProvider, value any, b *html.Builder) error

type HTML added in v0.22.21

type HTML struct{}

func (HTML) Edit added in v0.22.21

func (widget HTML) Edit(_ *form.Form, e *form.Element, _ form.LookupProvider, _ any, b *html.Builder) error

func (HTML) Encoding added in v0.22.21

func (widget HTML) Encoding(_ *form.Element) string

Encoding is a part of the Widget interface. It returns the encoding type for this widget. For HTML widgets, there is no special encoding, so this always returns an empty string.

func (HTML) ShowDescriptions added in v0.25.12

func (widget HTML) ShowDescriptions() string

ShowDescriptions is a part of the Widget interface. It returns the position of the description for this widget, which is either "TOP", "BOTTOM", or "NONE".

func (HTML) ShowLabels added in v0.22.21

func (widget HTML) ShowLabels() bool

ShowLabels is a part of the Widget interface. It returns TRUE if this widget requires labels to be displayed around it. For HTML widgets, labels are not shown, so this always returns FALSE.

func (HTML) View added in v0.22.21

func (widget HTML) View(_ *form.Form, e *form.Element, _ form.LookupProvider, _ any, b *html.Builder) error

type HTMLRemote added in v0.25.0

type HTMLRemote struct{}

func (HTMLRemote) Edit added in v0.25.0

func (widget HTMLRemote) Edit(_ *form.Form, e *form.Element, _ form.LookupProvider, value any, b *html.Builder) error

func (HTMLRemote) Encoding added in v0.25.0

func (widget HTMLRemote) Encoding(_ *form.Element) string

Encoding is a part of the Widget interface It returns the encoding type for this widget For HTMLRemote widgets, it always returns empty string

func (HTMLRemote) ShowDescriptions added in v0.25.12

func (widget HTMLRemote) ShowDescriptions() string

ShowDescriptions is a part of the Widget interface. It returns the position of the description for this widget, which is either "TOP", "BOTTOM", or "NONE".

func (HTMLRemote) ShowLabels added in v0.25.0

func (widget HTMLRemote) ShowLabels() bool

ShowLabels is a part of the Widget interface It indicates whether or not this widget wants labels to be shown For HTMLRemote widgets, this always returns FALSE

func (HTMLRemote) View added in v0.25.0

func (widget HTMLRemote) View(f *form.Form, e *form.Element, _ form.LookupProvider, value any, b *html.Builder) error

type Heading

type Heading struct{}

func (Heading) Edit

func (widget Heading) Edit(f *form.Form, e *form.Element, _ form.LookupProvider, value any, b *html.Builder) error

func (Heading) Encoding

func (widget Heading) Encoding(_ *form.Element) string

func (Heading) ShowDescriptions added in v0.25.12

func (widget Heading) ShowDescriptions() string

ShowDescriptions is a part of the Widget interface. It returns the position of the description for this widget, which is either "TOP", "BOTTOM", or "NONE".

func (Heading) ShowLabels

func (widget Heading) ShowLabels() bool

func (Heading) View

func (widget Heading) View(f *form.Form, e *form.Element, _ form.LookupProvider, value any, b *html.Builder) error

type Hidden

type Hidden struct{}

Hidden is a widget that creates a hidden input field.

func (Hidden) Edit

func (widget Hidden) Edit(f *form.Form, e *form.Element, _ form.LookupProvider, value any, b *html.Builder) error

Edit generates the HTML for editing a hidden input field.

func (Hidden) Encoding

func (widget Hidden) Encoding(_ *form.Element) string

func (Hidden) ShowDescriptions added in v0.25.12

func (widget Hidden) ShowDescriptions() string

ShowDescriptions is a part of the Widget interface. It returns the position of the description for this widget, which is either "TOP", "BOTTOM", or "NONE".

func (Hidden) ShowLabels

func (widget Hidden) ShowLabels() bool

func (Hidden) View

func (widget Hidden) View(_ *form.Form, _ *form.Element, _ form.LookupProvider, _ any, _ *html.Builder) error

View generates the HTML for viewing a hidden input field (which is nothing).

type Label

type Label struct{}

func (Label) Edit

func (widget Label) Edit(_ *form.Form, e *form.Element, _ form.LookupProvider, _ any, b *html.Builder) error

func (Label) Encoding

func (widget Label) Encoding(_ *form.Element) string

func (Label) ShowDescriptions added in v0.25.12

func (widget Label) ShowDescriptions() string

ShowDescriptions is a part of the Widget interface. It returns the position of the description for this widget, which is either "TOP", "BOTTOM", or "NONE".

func (Label) ShowLabels

func (widget Label) ShowLabels() bool

func (Label) View

func (widget Label) View(_ *form.Form, e *form.Element, _ form.LookupProvider, _ any, b *html.Builder) error

type LayoutGroup

type LayoutGroup struct{}

func (LayoutGroup) Edit

func (LayoutGroup) Edit(f *form.Form, e *form.Element, provider form.LookupProvider, value any, b *html.Builder) error

func (LayoutGroup) Encoding

func (widget LayoutGroup) Encoding(element *form.Element) string

func (LayoutGroup) ShowDescriptions added in v0.25.12

func (widget LayoutGroup) ShowDescriptions() string

ShowDescriptions is a part of the Widget interface. It returns the position of the description for this widget, which is either "TOP", "BOTTOM", or "NONE".

func (LayoutGroup) ShowLabels

func (LayoutGroup) ShowLabels() bool

func (LayoutGroup) View

func (LayoutGroup) View(f *form.Form, e *form.Element, provider form.LookupProvider, value any, b *html.Builder) error

type LayoutHorizontal

type LayoutHorizontal struct{}

func (LayoutHorizontal) Edit

func (widget LayoutHorizontal) Edit(f *form.Form, e *form.Element, provider form.LookupProvider, value any, b *html.Builder) error

func (LayoutHorizontal) Encoding

func (widget LayoutHorizontal) Encoding(element *form.Element) string

func (LayoutHorizontal) ShowDescriptions added in v0.25.12

func (widget LayoutHorizontal) ShowDescriptions() string

ShowDescriptions is a part of the Widget interface. It returns the position of the description for this widget, which is either "TOP", "BOTTOM", or "NONE".

func (LayoutHorizontal) ShowLabels

func (widget LayoutHorizontal) ShowLabels() bool

func (LayoutHorizontal) View

func (widget LayoutHorizontal) View(f *form.Form, e *form.Element, provider form.LookupProvider, value any, b *html.Builder) error

type LayoutTabs

type LayoutTabs struct{}

func (LayoutTabs) Edit

func (widget LayoutTabs) Edit(f *form.Form, e *form.Element, provider form.LookupProvider, value any, b *html.Builder) error

func (LayoutTabs) Encoding

func (widget LayoutTabs) Encoding(e *form.Element) string

Encoding is a part of the Widget interface It returns the encoding type for this widget For LayoutTabs widgets, it collects the encodings of all children

func (LayoutTabs) ShowDescriptions added in v0.25.12

func (widget LayoutTabs) ShowDescriptions() string

ShowDescriptions is a part of the Widget interface. It returns the position of the description for this widget, which is either "TOP", "BOTTOM", or "NONE".

func (LayoutTabs) ShowLabels

func (widget LayoutTabs) ShowLabels() bool

ShowLabels is a part of the Widget interface It indicates whether or not this widget wants labels to be shown For LayoutTabs widgets, this always returns FALSE

func (LayoutTabs) View

func (widget LayoutTabs) View(_ *form.Form, _ *form.Element, _ form.LookupProvider, _ any, _ *html.Builder) error

type LayoutVertical

type LayoutVertical struct{}

func (LayoutVertical) Edit

func (widget LayoutVertical) Edit(f *form.Form, e *form.Element, provider form.LookupProvider, value any, b *html.Builder) error

func (LayoutVertical) Encoding

func (widget LayoutVertical) Encoding(element *form.Element) string

func (LayoutVertical) ShowDescriptions added in v0.25.12

func (widget LayoutVertical) ShowDescriptions() string

ShowDescriptions is a part of the Widget interface. It returns the position of the description for this widget, which is either "TOP", "BOTTOM", or "NONE".

func (LayoutVertical) ShowLabels

func (widget LayoutVertical) ShowLabels() bool

func (LayoutVertical) View

func (widget LayoutVertical) View(f *form.Form, e *form.Element, provider form.LookupProvider, value any, b *html.Builder) error

type Multiselect

type Multiselect struct{}

func (Multiselect) Edit

func (widget Multiselect) Edit(f *form.Form, e *form.Element, provider form.LookupProvider, value any, b *html.Builder) error

Multiselect registers a custom multi-select widget into the library

func (Multiselect) Encoding

func (widget Multiselect) Encoding(_ *form.Element) string

Encoding is a part of the Widget interface. It returns the encoding type for this widget. For Multiselect widgets, there is no special encoding, so this always returns an empty string.

func (Multiselect) ShowDescriptions added in v0.25.12

func (widget Multiselect) ShowDescriptions() string

ShowDescriptions is a part of the Widget interface. It returns the position of the description for this widget, which is either "TOP", "BOTTOM", or "NONE".

func (Multiselect) ShowLabels

func (widget Multiselect) ShowLabels() bool

ShowLabels is a part of the Widget interface. It returns TRUE if this widget requires labels to be displayed around it. For Multiselect widgets, labels are shown, so this always returns TRUE.

func (Multiselect) View

func (widget Multiselect) View(f *form.Form, e *form.Element, provider form.LookupProvider, value any, b *html.Builder) error

type Password added in v0.22.14

type Password struct{}

func (Password) Edit added in v0.22.14

func (widget Password) Edit(_ *form.Form, e *form.Element, _ form.LookupProvider, _ any, b *html.Builder) error

func (Password) Encoding added in v0.22.14

func (widget Password) Encoding(_ *form.Element) string

Encoding is a part of the Widget interface. It returns the encoding type for this widget. For Password widgets, there is no special encoding, so this always returns an empty string.

func (Password) ShowDescriptions added in v0.25.12

func (widget Password) ShowDescriptions() string

ShowDescriptions is a part of the Widget interface. It returns the position of the description for this widget, which is either "TOP", "BOTTOM", or "NONE".

func (Password) ShowLabels added in v0.22.14

func (widget Password) ShowLabels() bool

ShowLabels is a part of the Widget interface. It indicates whether labels should be shown for this widget. For Password widgets, labels are shown, so this always returns TRUE.

func (Password) View added in v0.22.14

func (widget Password) View(_ *form.Form, e *form.Element, _ form.LookupProvider, _ any, b *html.Builder) error

type Place added in v0.25.2

type Place struct{}

Place is a form widget that presents an address lookup box. It returns a place name, latitude, and longitude. If an endpoint URL is provided, then this widget will query the server for matching place names.

func (Place) Edit added in v0.25.2

func (widget Place) Edit(f *form.Form, e *form.Element, _ form.LookupProvider, value any, b *html.Builder) error

Edit is a part of the Widget interface. It builds the HTML for editing this element.

func (Place) Encoding added in v0.25.2

func (widget Place) Encoding(_ *form.Element) string

Encoding is a part of the Widget interface. It returns the encoding type for this widget. For Place widgets, there is no special encoding, so this always returns an empty string.

func (Place) SetURLValue added in v0.25.2

func (widget Place) SetURLValue(form *form.Form, element *form.Element, object any, values url.Values) error

SetURLValue is a part of the URLValueSetter interface. It applies applies all values from a url.Values slice to the provided object.

func (Place) ShowDescriptions added in v0.25.12

func (widget Place) ShowDescriptions() string

ShowDescriptions is a part of the Widget interface. It returns the position of the description for this widget, which is either "TOP", "BOTTOM", or "NONE".

func (Place) ShowLabels added in v0.25.2

func (widget Place) ShowLabels() bool

ShowLabels is a part of the Widget interface. It returns TRUE if this widget requires labels to be displayed around it. For Place widgets, labels are shown, so this always returns TRUE.

func (Place) View added in v0.25.2

func (widget Place) View(f *form.Form, e *form.Element, _ form.LookupProvider, value any, b *html.Builder) error

View is a part of the Widget interface. It builds the HTML for viewing this element.

type Radio

type Radio struct{}

Radio is a widget that displays a list of radio buttons for selecting a single value from a list.

func (Radio) Edit

func (widget Radio) Edit(f *form.Form, e *form.Element, provider form.LookupProvider, value any, b *html.Builder) error

Edit is a part of the Widget interface. It builds the HTML for editing this element.

func (Radio) Encoding

func (widget Radio) Encoding(_ *form.Element) string

func (Radio) ShowDescriptions added in v0.25.12

func (widget Radio) ShowDescriptions() string

ShowDescriptions is a part of the Widget interface. It returns the position of the description for this widget, which is either "TOP", "BOTTOM", or "NONE".

func (Radio) ShowLabels

func (widget Radio) ShowLabels() bool

func (Radio) View

func (widget Radio) View(f *form.Form, e *form.Element, provider form.LookupProvider, value any, b *html.Builder) error

View is a part of the Widget interface. It builds the HTML for viewing this element.

type RadioButtonGroup added in v0.25.11

type RadioButtonGroup struct{}

RadioButtonGroup renders a group of fancy radio buttons that look like buttons

func (RadioButtonGroup) Edit added in v0.25.11

func (widget RadioButtonGroup) Edit(f *form.Form, e *form.Element, provider form.LookupProvider, value any, b *html.Builder) error

func (RadioButtonGroup) Encoding added in v0.25.11

func (widget RadioButtonGroup) Encoding(_ *form.Element) string

func (RadioButtonGroup) ShowDescriptions added in v0.25.12

func (widget RadioButtonGroup) ShowDescriptions() string

ShowDescriptions is a part of the Widget interface. It returns the position of the description for this widget, which is either "TOP", "BOTTOM", or "NONE".

func (RadioButtonGroup) ShowLabels added in v0.25.11

func (widget RadioButtonGroup) ShowLabels() bool

func (RadioButtonGroup) View added in v0.25.11

func (widget RadioButtonGroup) View(f *form.Form, e *form.Element, provider form.LookupProvider, value any, b *html.Builder) error

type RadioColors added in v0.25.11

type RadioColors struct{}

RadioColors is a widget that displays a list of radio buttons for selecting a single value from a list.

func (RadioColors) Edit added in v0.25.11

func (widget RadioColors) Edit(f *form.Form, e *form.Element, provider form.LookupProvider, value any, b *html.Builder) error

Edit is a part of the Widget interface. It builds the HTML for editing this element.

func (RadioColors) Encoding added in v0.25.11

func (widget RadioColors) Encoding(_ *form.Element) string

func (RadioColors) ShowDescriptions added in v0.25.12

func (widget RadioColors) ShowDescriptions() string

ShowDescriptions is a part of the Widget interface. It returns the position of the description for this widget, which is either "TOP", "BOTTOM", or "NONE".

func (RadioColors) ShowLabels added in v0.25.11

func (widget RadioColors) ShowLabels() bool

func (RadioColors) View added in v0.25.11

func (widget RadioColors) View(f *form.Form, e *form.Element, provider form.LookupProvider, value any, b *html.Builder) error

View is a part of the Widget interface. It builds the HTML for viewing this element.

type Select

type Select struct{}

Select renders a select box widget

func (Select) Edit

func (widget Select) Edit(f *form.Form, e *form.Element, provider form.LookupProvider, value any, b *html.Builder) error

func (Select) Encoding

func (widget Select) Encoding(_ *form.Element) string

func (Select) ShowDescriptions added in v0.25.12

func (widget Select) ShowDescriptions() string

ShowDescriptions is a part of the Widget interface. It returns the position of the description for this widget, which is either "TOP", "BOTTOM", or "NONE".

func (Select) ShowLabels

func (widget Select) ShowLabels() bool

func (Select) View

func (widget Select) View(f *form.Form, e *form.Element, provider form.LookupProvider, value any, b *html.Builder) error

type SelectGroup added in v0.25.5

type SelectGroup struct{}

SelectGroup renders two linked select boxes

func (SelectGroup) Edit added in v0.25.5

func (widget SelectGroup) Edit(f *form.Form, e *form.Element, provider form.LookupProvider, value any, b *html.Builder) error

func (SelectGroup) Encoding added in v0.25.5

func (widget SelectGroup) Encoding(_ *form.Element) string

Encoding is a part of the Widget interface. It returns the encoding type for this widget. For SelectGroup widgets, there is no special encoding, so this always returns an empty string.

func (SelectGroup) ShowDescriptions added in v0.25.12

func (widget SelectGroup) ShowDescriptions() string

ShowDescriptions is a part of the Widget interface. It returns the position of the description for this widget, which is either "TOP", "BOTTOM", or "NONE".

func (SelectGroup) ShowLabels added in v0.25.5

func (widget SelectGroup) ShowLabels() bool

ShowLabels is a part of the Widget interface. It returns TRUE if this widget requires labels to be displayed around it. For SelectGroup widgets, labels are shown, so this always returns TRUE.

func (SelectGroup) View added in v0.25.5

func (widget SelectGroup) View(f *form.Form, e *form.Element, provider form.LookupProvider, value any, b *html.Builder) error

type Text

type Text struct{}

Text is a widget that creates a text input field.

func (Text) Edit

func (widget Text) Edit(f *form.Form, e *form.Element, provider form.LookupProvider, value any, b *html.Builder) error

Edit generates the HTML for editing a text input field.

func (Text) Encoding

func (widget Text) Encoding(_ *form.Element) string

Encoding is a part of the Widget interface. It returns the encoding type for this widget. For Text widgets, there is no special encoding, so this always returns an empty string.

func (Text) ShowDescriptions added in v0.25.12

func (widget Text) ShowDescriptions() string

ShowDescriptions is a part of the Widget interface. It returns the position of the description for this widget, which is either "TOP", "BOTTOM", or "NONE".

func (Text) ShowLabels

func (widget Text) ShowLabels() bool

ShowLabels is a part of the Widget interface. It returns TRUE if this widget requires labels to be displayed around it. For Text widgets, labels are shown, so this always returns TRUE.

func (Text) View

func (widget Text) View(f *form.Form, e *form.Element, _ form.LookupProvider, value any, b *html.Builder) error

View generates the HTML for viewing a text input field.

type TextArea

type TextArea struct{}

TextArea renders a long text <textarea> widget

func (TextArea) Edit

func (widget TextArea) Edit(f *form.Form, e *form.Element, _ form.LookupProvider, value any, b *html.Builder) error

func (TextArea) Encoding

func (widget TextArea) Encoding(_ *form.Element) string

func (TextArea) ShowDescriptions added in v0.25.12

func (widget TextArea) ShowDescriptions() string

ShowDescriptions is a part of the Widget interface. It returns the position of the description for this widget, which is either "TOP", "BOTTOM", or "NONE".

func (TextArea) ShowLabels

func (widget TextArea) ShowLabels() bool

func (TextArea) View

func (widget TextArea) View(f *form.Form, e *form.Element, _ form.LookupProvider, value any, b *html.Builder) error

type TimePicker added in v0.22.17

type TimePicker struct{}

func (TimePicker) Edit added in v0.22.17

func (widget TimePicker) Edit(f *form.Form, e *form.Element, _ form.LookupProvider, value any, b *html.Builder) error

func (TimePicker) Encoding added in v0.22.17

func (widget TimePicker) Encoding(_ *form.Element) string

func (TimePicker) ShowDescriptions added in v0.25.12

func (widget TimePicker) ShowDescriptions() string

ShowDescriptions is a part of the Widget interface. It returns the position of the description for this widget, which is either "TOP", "BOTTOM", or "NONE".

func (TimePicker) ShowLabels added in v0.22.17

func (widget TimePicker) ShowLabels() bool

func (TimePicker) View added in v0.22.17

func (widget TimePicker) View(f *form.Form, e *form.Element, _ form.LookupProvider, value any, b *html.Builder) error

type Toggle

type Toggle struct{}

Toggle renders a custom toggle widget

func (Toggle) Edit

func (widget Toggle) Edit(f *form.Form, e *form.Element, _ form.LookupProvider, value any, b *html.Builder) error

Edit generates the HTML for editing a toggle widget.

func (Toggle) Encoding

func (widget Toggle) Encoding(_ *form.Element) string

Encoding is a part of the Widget interface. It returns the encoding type for this widget. For Toggle widgets, there is no special encoding, so this always returns an empty string.

func (Toggle) ShowDescriptions added in v0.25.12

func (widget Toggle) ShowDescriptions() string

ShowDescriptions is a part of the Widget interface. It returns the position of the description for this widget, which is either "TOP", "BOTTOM", or "NONE".

func (Toggle) ShowLabels

func (widget Toggle) ShowLabels() bool

ShowLabels is a part of the Widget interface. It returns TRUE if this widget requires labels to be displayed around it. For Toggle widgets, labels are shown, so this always returns TRUE.

func (Toggle) View

func (widget Toggle) View(f *form.Form, e *form.Element, _ form.LookupProvider, value any, b *html.Builder) error

View generates the HTML for viewing a toggle widget's value.

type Upload

type Upload struct{}

func (Upload) Edit

func (widget Upload) Edit(f *form.Form, e *form.Element, _ form.LookupProvider, value any, b *html.Builder) error

func (Upload) Encoding

func (widget Upload) Encoding(_ *form.Element) string

func (Upload) ShowDescriptions added in v0.25.12

func (widget Upload) ShowDescriptions() string

ShowDescriptions is a part of the Widget interface. It returns the position of the description for this widget, which is either "TOP", "BOTTOM", or "NONE".

func (Upload) ShowLabels

func (widget Upload) ShowLabels() bool

func (Upload) View

func (widget Upload) View(f *form.Form, e *form.Element, _ form.LookupProvider, value any, b *html.Builder) error

type WYSIWYG

type WYSIWYG struct{}

func (WYSIWYG) Edit

func (widget WYSIWYG) Edit(f *form.Form, e *form.Element, _ form.LookupProvider, value any, b *html.Builder) error

func (WYSIWYG) Encoding

func (widget WYSIWYG) Encoding(_ *form.Element) string

Encoding is a part of the Widget interface. It returns the encoding type for this widget. For WYSIWYG widgets, there is no special encoding, so this always returns an empty string.

func (WYSIWYG) ShowDescriptions added in v0.25.12

func (widget WYSIWYG) ShowDescriptions() string

ShowDescriptions is a part of the Widget interface. It returns the position of the description for this widget, which is either "TOP", "BOTTOM", or "NONE".

func (WYSIWYG) ShowLabels

func (widget WYSIWYG) ShowLabels() bool

ShowLabels is a part of the Widget interface. It returns TRUE if this widget requires labels to be displayed around it. For WYSIWYG widgets, labels are shown, so this always returns TRUE.

func (WYSIWYG) View

func (widget WYSIWYG) View(f *form.Form, e *form.Element, _ form.LookupProvider, value any, b *html.Builder) error

Jump to

Keyboard shortcuts

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