Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Boolean represents a 'boolean' form field. Boolean = "boolean" // Fixed represents a 'fixed' form field. Fixed = "fixed" // Hidden represents a 'hidden' form field. Hidden = "hidden" // JidMulti represents a 'jid-multi' form field. JidMulti = "jid-multi" // JidSingle represents a 'jid-single' form field. JidSingle = "jid-single" // ListMulti represents a 'list-multi' form field. ListMulti = "list-multi" // ListSingle represents a 'list-single' form field. ListSingle = "list-single" // TextMulti represents a 'text-multi' form field. TextMulti = "text-multi" // TextPrivate represents a 'text-private' form field. TextPrivate = "text-private" // TextSingle represents a 'text-single' form field. TextSingle = "text-single" )
View Source
const ( // Form represents a 'form' data form. Form = "form" // Submit represents a 'submit' data form. Submit = "submit" // Cancel represents a 'cancel' data form. Cancel = "cancel" // Result represents a 'result' data form. Result = "result" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataForm ¶
type DataForm struct {
Type string
Title string
Instructions string
Fields []Field
Reported []Field
Items [][]Field
}
DataForm represents a form that could be use for gathering data as well as for reporting data returned from a search.
func NewFormFromElement ¶
NewFormFromElement returns a new data form entity reading it from it's XMPP representation.
type Field ¶
type Field struct {
Var string
Required bool
Type string
Label string
Description string
Values []string
Options []Option
}
Field represents a field of a form. The field could be used to represent a question to complete, a completed question or a data returned from a search.
func NewFieldFromElement ¶
NewFieldFromElement returns a new form field entity reading it from it's XMPP representation.
Click to show internal directories.
Click to hide internal directories.