form

package
v0.0.0-...-9f7285a Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HintTypeWarning = "warning"
	HintTypeInfo    = "info"
)
View Source
const FormFieldSetMetadataKey = "form"

Variables

This section is empty.

Functions

This section is empty.

Types

type FormField

type FormField struct {
	Priority        int               `json:"-"`
	Id              string            `json:"id"`
	Type            string            `json:"type"`
	Label           string            `json:"label"`
	Description     string            `json:"description"`
	Hint            string            `json:"hint"`
	HintType        FormFieldHintType `json:"hintType"`
	Default         string            `json:"default"`
	AllowEdit       bool              `json:"allowEdit"`
	Suggestions     []string          `json:"suggestions"`
	ValidationError string            `json:"validationError"`
}

type FormFieldHintType

type FormFieldHintType string

type FormFieldSet

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

FormFieldSet is a metadata type used in frontend to generate the form fields.

func (*FormFieldSet) DangerouslyGetField

func (f *FormFieldSet) DangerouslyGetField(id string) *FormField

DangerouslyGetField shouldn't be used in non testing code. Because a field shouldn't depend on the other field metadata. This is only for testing purpose.

func (*FormFieldSet) Labels

func (*FormFieldSet) Labels() *task.LabelSet

Labels implements Metadata.

func (*FormFieldSet) SetField

func (f *FormFieldSet) SetField(newField *FormField) error

func (*FormFieldSet) ToSerializable

func (f *FormFieldSet) ToSerializable() interface{}

type FormFieldSetMetadataFactory

type FormFieldSetMetadataFactory struct{}

func (*FormFieldSetMetadataFactory) Instanciate

Instanciate implements metadata.MetadataFactory.

Jump to

Keyboard shortcuts

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