package
0.0.0-20180612134603-5a689ece0d3e
Repository: https://github.com/mjkwoolnough/gopherjs.git
Documentation: pkg.go.dev

# README

xform

-- import "github.com/MJKWoolnough/gopherjs/xform"

Package xform provides some shortcut funcs for various form related activites

Usage

func InputButton

func InputButton(id, name string) *dom.HTMLInputElement

InputButton creates a button input

func InputCheckbox

func InputCheckbox(id string, value bool) *dom.HTMLInputElement

InputCheckbox creates a checkbox input

func InputColor

func InputColor(id string) *dom.HTMLInputElement

InputColor creates a colour based input box, the workings of which are implementation specific

func InputDate

func InputDate(id string) *dom.HTMLInputElement

InputDate create a date based input, the workings of which are implementation specific

func InputDateTime

func InputDateTime(id string) *dom.HTMLInputElement

InputDateTime create a datetime based input, the workings of which are implementation specific

func InputDateTimeLocal

func InputDateTimeLocal(id string) *dom.HTMLInputElement

InputDateTimeLocal create a local datetime based input, the workings of which are implementation specific

func InputEmail

func InputEmail(id, value string) *dom.HTMLInputElement

InputEmail is a text box that validates as an email address

func InputMonth

func InputMonth(id string) *dom.HTMLInputElement

InputMonth creates a month based input box

func InputNumber

func InputNumber(id string, min, max, value float64) *dom.HTMLInputElement

InputNumber creates a text input that only allows number to be entered

func InputPassword

func InputPassword(id, value string) *dom.HTMLInputElement

InputPassword creates a password input

func InputRadio

func InputRadio(id, name string, value bool) *dom.HTMLInputElement

InputRadio create a radio button input

func InputRange

func InputRange(id string, min, max, step, value float64) *dom.HTMLInputElement

InputRange creates a sliding rule with which a number in the given range can be selected

func InputSizeable

func InputSizeable(id, value string) *dom.HTMLSpanElement

InputSizeable returns a content-editable span that is style to look a text input box

func InputSubmit

func InputSubmit(name string) *dom.HTMLInputElement

InputSubmit creates a submit input

func InputText

func InputText(id, value string) *dom.HTMLInputElement

InputText creates a text input box

func InputTime

func InputTime(id string) *dom.HTMLInputElement

InputTime creates a time based input box

func InputURL

func InputURL(id, value string) *dom.HTMLInputElement

InputURL is a text box that validates as a URL

func InputUpload

func InputUpload(id string) *dom.HTMLInputElement

InputUpload creates an upload input field

func InputWeek

func InputWeek(id string) *dom.HTMLInputElement

InputWeek creates a week based input box

func Label

func Label(label, forID string) *dom.HTMLLabelElement

Label create a form label

func SelectBox

func SelectBox(id string, values ...Option) *dom.HTMLSelectElement

SelectBox provides a select input, filled with the given options

func TextArea

func TextArea(id string, value string) *dom.HTMLTextAreaElement

TextArea provides a textarea input

type Option

type Option struct {
	Label, Value string
	Selected     bool
}

Option is a structure to define a 'select's option.

type SizeableList

type SizeableList struct {
	*dom.HTMLDivElement
}

SizeableList is a collection of InputSizable elements

func InputSizeableList

func InputSizeableList(values ...string) *SizeableList

InputSizeableList creates a list of InputSizeable elements, wrapped in a div

func (*SizeableList) Values

func (s *SizeableList) Values() []string

Values returns the values of the enclose InputSizeable's

# Functions

InputButton creates a button input.
InputCheckbox creates a checkbox input.
InputColor creates a colour based input box, the workings of which are implementation specific.
InputDate create a date based input, the workings of which are implementation specific.
InputDateTime create a datetime based input, the workings of which are implementation specific.
InputDateTimeLocal create a local datetime based input, the workings of which are implementation specific.
InputEmail is a text box that validates as an email address.
InputMonth creates a month based input box.
InputNumber creates a text input that only allows number to be entered.
InputPassword creates a password input.
InputRadio create a radio button input.
InputRange creates a sliding rule with which a number in the given range can be selected.
InputSizeable returns a content-editable span that is style to look a text input box.
InputSizeableList creates a list of InputSizeable elements, wrapped in a div.
InputSubmit creates a submit input.
InputText creates a text input box.
InputTime creates a time based input box.
InputUpload creates an upload input field.
InputURL is a text box that validates as a URL.
InputWeek creates a week based input box.
Label create a form label.
SelectBox provides a select input, filled with the given options.
TextArea provides a textarea input.

# Structs

Option is a structure to define a 'select's option.
SizeableList is a collection of InputSizable elements.