ErrFormNotFound
*errors.errorString- OID
- 037f8d…de93:4
ErrFormNotFound details
ErrFormClosed
*errors.errorString- OID
- 037f8d…de93:7
ErrFormClosed details
ErrFormOpen
*errors.errorString- OID
- 037f8d…de93:10
ErrFormOpen details
ErrNotOwner
*errors.errorString- OID
- 037f8d…de93:13
ErrNotOwner details
ErrNoFields
*errors.errorString- OID
- 037f8d…de93:16
ErrNoFields details
ErrTooManyFields
*errors.errorString- OID
- 037f8d…de93:19
ErrTooManyFields details
ErrFieldSpecMismatch
*errors.errorString- OID
- 037f8d…de93:22
ErrFieldSpecMismatch details
ErrBadFieldKind
*errors.errorString- OID
- 037f8d…de93:25
ErrBadFieldKind details
ErrSelectNoOptions
*errors.errorString- OID
- 037f8d…de93:28
ErrSelectNoOptions details
ErrEmptyLabel
*errors.errorString- OID
- 037f8d…de93:31
ErrEmptyLabel details
ErrEmptyTitle
*errors.errorString- OID
- 037f8d…de93:34
ErrEmptyTitle details
ErrTitleTooLong
*errors.errorString- OID
- 037f8d…de93:37
ErrTitleTooLong details
ErrDescriptionTooLong
*errors.errorString- OID
- 037f8d…de93:40
ErrDescriptionTooLong details
ErrBadDeadline
*errors.errorString- OID
- 037f8d…de93:43
ErrBadDeadline details
ErrDeadlinePassed
*errors.errorString- OID
- 037f8d…de93:46
ErrDeadlinePassed details
ErrAlreadyResponded
*errors.errorString- OID
- 037f8d…de93:49
ErrAlreadyResponded details
ErrNoResponse
*errors.errorString- OID
- 037f8d…de93:52
ErrNoResponse details
ErrRequired
*errors.errorString- OID
- 037f8d…de93:55
ErrRequired details
ErrNotANumber
*errors.errorString- OID
- 037f8d…de93:58
ErrNotANumber details
ErrNotAnOption
*errors.errorString- OID
- 037f8d…de93:61
ErrNotAnOption details
ErrAnswerTooLong
*errors.errorString- OID
- 037f8d…de93:64
ErrAnswerTooLong details
ErrTooManyAnswers
*errors.errorString- OID
- 037f8d…de93:67
ErrTooManyAnswers details
ErrNotUserCall
*errors.errorString- OID
- 037f8d…de93:70
ErrNotUserCall details
forms
*v0.Tree// form id -> \*Form
- OID
- 037f8d…de93:73
forms details
nextFormID
v0.IDValue
<zero>
nextRespID
v0.IDValue
<zero>
Create
func(title string, description string, labels string, kinds string, required string, options string, onePerAddr bool, deadline int64) stringCreate publishes a new form and returns its ID. Fields are described by four parallel, pipe-separated strings so the call stays usable from gnokey and gnoweb without structured arguments: labels: "Name|Why gno.land?|Server type" kinds: "text|textarea|select" required: "1|1|0" options: "||cloud,on-prem,data-center" (comma-separated; only select uses it) deadline is a chain height after which the form stops accepting responses, or 0 for none. onePerAddr limits each address to a single response.
- OID
- 037f8d…de93:77
Create details
Close
func(id string)Close stops a form from accepting responses. Owner only.
- OID
- 037f8d…de93:79
Close details
Reopen
func(id string)Reopen lets a closed form accept responses again. Owner only. A form whose deadline has passed stays closed regardless.
- OID
- 037f8d…de93:80
Reopen details
TransferOwnership
func(id string, to .uverse.address)TransferOwnership hands a form to another address. Owner only.
- OID
- 037f8d…de93:81
TransferOwnership details
GetForm
func(id string) (*test.Form, bool)GetForm returns a form by ID.
- OID
- 037f8d…de93:82
GetForm details
ResponseCount
func(id string) intResponseCount returns how many responses the form currently holds.
- OID
- 037f8d…de93:83
ResponseCount details
FormCount
func() intFormCount returns how many forms exist.
- OID
- 037f8d…de93:84
FormCount details
mustGetForm
func(id string) *test.Form- OID
- 037f8d…de93:85
mustGetForm details
mustUserCaller
func() .uverse.address- OID
- 037f8d…de93:86
mustUserCaller details
parseFields
func(labels string, kinds string, required string, options string) []test.FieldparseFields decodes the four parallel field-spec strings.
- OID
- 037f8d…de93:87
parseFields details
splitFields
func(s string) []string- OID
- 037f8d…de93:88
splitFields details
formsPerPage
untyped bigintValue
(20 <untyped> bigint)
responsesPerPage
untyped bigintValue
(25 <untyped> bigint)
router
*v0.Router- OID
- 037f8d…de93:90
router details
init.40
func()- OID
- 037f8d…de93:93
init.40 details
Render
func(path string) stringRender routes: /r/<ns>/forms index of forms /r/<ns>/forms:<id> a form, fillable in gnoweb /r/<ns>/forms:<id>/responses its responses, paginated /r/<ns>/forms:<id>/responses.csv its responses as CSV
- OID
- 037f8d…de93:95
Render details
renderIndex
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 037f8d…de93:96
renderIndex details
renderForm
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 037f8d…de93:97
renderForm details
renderMDForm
func(f *test.Form) stringrenderMDForm draws the fillable form. gnoweb turns it into an HTML form that calls Submit; each input is named after the Submit parameter it fills.
- OID
- 037f8d…de93:98
renderMDForm details
renderResponses
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 037f8d…de93:99
renderResponses details
renderCSV
func(res *v0.ResponseWriter, req *v0.Request)renderCSV emits every response as CSV inside a code block, so a reviewer can copy it straight into a spreadsheet.
- OID
- 037f8d…de93:100
renderCSV details
renderCreateHelp
func() string- OID
- 037f8d…de93:101
renderCreateHelp details
statusLabel
func(f *test.Form, height int64) string- OID
- 037f8d…de93:102
statusLabel details
formURL
func(id string) string- OID
- 037f8d…de93:103
formURL details
responsesURL
func(id string) string- OID
- 037f8d…de93:104
responsesURL details
csvURL
func(id string) string- OID
- 037f8d…de93:105
csvURL details
realmPath
stringValue
"gno.land/r/nym-encapsulate001/test"
realmURL
func() stringrealmURL is this realm's path as gnoweb addresses it, derived from where it is deployed rather than hardcoded.
- OID
- 037f8d…de93:107
realmURL details
shortAddr
func(a .uverse.address) string- OID
- 037f8d…de93:108
shortAddr details
cell
func(s string) stringcell makes an answer safe inside a markdown table cell.
- OID
- 037f8d…de93:109
cell details
csvRow
func(fields []string) stringcsvRow quotes every field, doubling embedded quotes, per RFC 4180.
- OID
- 037f8d…de93:110
csvRow details
Submit
func(id string, a1 string, a2 string, a3 string, a4 string, a5 string, a6 string, a7 string, a8 string)Submit records a response to a form. Answers a1..a8 align with the form's fields in order; slots beyond the form's field count must be empty. gnoweb builds this call from the rendered form: each input is named after the parameter it fills, and parameters with no input arrive as "". The respondent pays the storage deposit for their own answers, and gets it back on Withdraw.
- OID
- 037f8d…de93:111
Submit details
Withdraw
func(id string)Withdraw deletes the caller's response to a form. The storage deposit the answers were holding is refunded to the caller by the chain. Only the author can withdraw. Owners cannot delete responses: the refund goes to whoever deletes, which would hand the owner the respondent's deposit.
- OID
- 037f8d…de93:113
Withdraw details
validateAnswers
func(f *test.Form, raw []string) []stringvalidateAnswers checks every answer against its field and returns the trimmed answers, exactly len(f.Fields) long. Nothing is written before it returns, so a rejected submission leaves no trace.
- OID
- 037f8d…de93:114
validateAnswers details
fieldErr
func(i int, err .uverse.error) string- OID
- 037f8d…de93:115
fieldErr details
contains
func(list []string, s string) bool- OID
- 037f8d…de93:116
contains details
FieldKind
typeFieldKind is the input type a field renders as, and the validation it gets.
Value
test.FieldKind
KindText
test.FieldKindValue
<gnolang.StringValue>
KindTextarea
test.FieldKindValue
<gnolang.StringValue>
KindNumber
test.FieldKindValue
<gnolang.StringValue>
KindSelect
test.FieldKindValue
<gnolang.StringValue>
MaxFields
untyped bigintLimits. Answers are stored on chain and the respondent pays the storage deposit for them, so the caps exist to keep that cost predictable rather than to save the realm anything.
Value
(8 <untyped> bigint)
MaxTitleLen
untyped bigintLimits. Answers are stored on chain and the respondent pays the storage deposit for them, so the caps exist to keep that cost predictable rather than to save the realm anything.
Value
(120 <untyped> bigint)
MaxDescriptionLen
untyped bigintLimits. Answers are stored on chain and the respondent pays the storage deposit for them, so the caps exist to keep that cost predictable rather than to save the realm anything.
Value
(2048 <untyped> bigint)
MaxLabelLen
untyped bigintLimits. Answers are stored on chain and the respondent pays the storage deposit for them, so the caps exist to keep that cost predictable rather than to save the realm anything.
Value
(120 <untyped> bigint)
MaxOptionLen
untyped bigintLimits. Answers are stored on chain and the respondent pays the storage deposit for them, so the caps exist to keep that cost predictable rather than to save the realm anything.
Value
(120 <untyped> bigint)
MaxTextLen
untyped bigintLimits. Answers are stored on chain and the respondent pays the storage deposit for them, so the caps exist to keep that cost predictable rather than to save the realm anything.
Value
(256 <untyped> bigint)
MaxTextareaLen
untyped bigintLimits. Answers are stored on chain and the respondent pays the storage deposit for them, so the caps exist to keep that cost predictable rather than to save the realm anything.
Value
(2048 <untyped> bigint)
MaxNumberLen
untyped bigintLimits. Answers are stored on chain and the respondent pays the storage deposit for them, so the caps exist to keep that cost predictable rather than to save the realm anything.
Value
(64 <untyped> bigint)
Field
typeField is one question on a form.
Value
test.Field
Form
typeForm is a published questionnaire and its responses.
Value
test.Form
Response
typeResponse is one submission to a form. Answers align with Form.Fields.
Value
test.Response