forms

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2020 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(options ...seed.Option) seed.Seed

New returns a new HTML form element.

func ReportValidity

func ReportValidity(form seed.Seed) client.Bool

ReportValidity reports the validity of the form.

func SetRequired

func SetRequired() seed.Option

SetRequired sets the input element to be required for the form.

Types

type DateField

type DateField struct {
	Title, Placeholder string

	Update *clientside.String

	Required bool

	Theme FieldTheme
}

func (DateField) AddTo

func (field DateField) AddTo(c seed.Seed)

type EmailField

type EmailField struct {
	Title, Placeholder string

	Update *clientside.String

	Required bool

	Theme FieldTheme
}

func (EmailField) AddTo

func (field EmailField) AddTo(c seed.Seed)

type FieldTheme

type FieldTheme struct {
	Title, Box, Area, Column, ErrorText, ErrorBox seed.Options
}

type FloatField

type FloatField struct {
	Title, Placeholder string

	Update *clientside.Float64

	Checker client.Script

	Required bool

	Theme FieldTheme
}

func (FloatField) AddTo

func (field FloatField) AddTo(c seed.Seed)

type PasswordField

type PasswordField struct {
	Title    string
	Required bool

	Theme FieldTheme

	Update  *clientside.Secret
	Confirm bool
}

func (PasswordField) AddTo

func (field PasswordField) AddTo(c seed.Seed)

type SubmitButton

type SubmitButton struct {
	Title             string
	Theme, ThemeError seed.Options

	OnSubmit client.Script

	Spinner seed.Seed
}

func (SubmitButton) AddTo

func (submit SubmitButton) AddTo(c seed.Seed)

type TextField

type TextField struct {
	Title, Placeholder string

	Update *clientside.String

	Checker client.Script

	Suggestions []string

	Required, Multiline bool

	Theme FieldTheme
}

func (TextField) AddTo

func (field TextField) AddTo(c seed.Seed)

Jump to

Keyboard shortcuts

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