forms

package
v0.20251216.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckboxField

type CheckboxField struct {
	// contains filtered or unexported fields
}

func NewCheckboxField

func NewCheckboxField(displayName, name, text string, required bool) *CheckboxField

func (CheckboxField) RenderField

func (field CheckboxField) RenderField() template.HTML
type DropdownField struct {
	// contains filtered or unexported fields
}
func (field DropdownField) RenderField() template.HTML

type Field

type Field interface {
	// RenderForm returns the HTML representation of the field.
	RenderField() template.HTML
}

func NewDropdownField

func NewDropdownField(displayName, name, description string, options []string, required bool) Field

type Form

type Form []Field

func NewForm

func NewForm(fields ...Field) *Form

func (*Form) RenderForm

func (form *Form) RenderForm() template.HTML

type InputField

type InputField struct {
	// contains filtered or unexported fields
}

func NewInputField

func NewInputField(displayName, name, description string, required bool) *InputField

func (InputField) RenderField

func (field InputField) RenderField() template.HTML

type TextareaField

type TextareaField struct {
	// contains filtered or unexported fields
}

func NewTextareaField

func NewTextareaField(displayName, name, description string, rows int, required bool) *TextareaField

func (TextareaField) RenderField

func (field TextareaField) RenderField() template.HTML

Jump to

Keyboard shortcuts

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