Documentation
¶
Index ¶
- type Field
- type Fieldset
- type Form
- func (b *Form) AddFieldset(legend string, tabIndex int, fields ...Field) *Form
- func (b *Form) AddInput(name, label string, typ InputType, required bool) *Form
- func (b *Form) AddRadioGroup(legend string, name string, options ...Option) *Form
- func (b *Form) Render() string
- func (f *Form) RenderCSS() string
- func (b *Form) RenderHTML() string
- func (b *Form) SetAutocomplete(enable bool) *Form
- type InputField
- type InputType
- type Option
- type RadioGroupField
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Field ¶
type Field interface {
Render() string
}
Field interface for different types of form elements
type Form ¶
Form represents a form definition
func (*Form) AddFieldset ¶
func (*Form) AddRadioGroup ¶
func (*Form) RenderHTML ¶
RenderHTML implements site.Component interface
func (*Form) SetAutocomplete ¶
type InputField ¶
type InputField struct {
ID string
Name string
Label string
Type InputType
Required bool
Value string
}
InputField represents a standard input field
func (*InputField) Render ¶
func (f *InputField) Render() string
type RadioGroupField ¶
RadioGroupField represents a group of radio buttons
func (*RadioGroupField) Render ¶
func (f *RadioGroupField) Render() string
Click to show internal directories.
Click to hide internal directories.