Browse Source

Modified definition of the Form interface.

Wirecog 7 years ago
parent
commit
e1a5258fa1
1 changed files with 6 additions and 2 deletions
  1. 6
    2
      form.go

+ 6
- 2
form.go View File

13
 
13
 
14
 type Form interface {
14
 type Form interface {
15
 	Validate() bool
15
 	Validate() bool
16
-	AutofillFields() []string
17
 	Fields() map[string]string
16
 	Fields() map[string]string
18
 	Errors() map[string]string
17
 	Errors() map[string]string
19
-	//	SetError(key string, message string)
18
+	FormParams() *FormParams
19
+	PrefillFields()
20
+	SetFields(fields map[string]string)
21
+	SetErrors(errors map[string]string)
22
+	SetFormParams(formParams *FormParams)
23
+	SetPrefillFields(prefillFields []string)
20
 }
24
 }
21
 
25
 
22
 func FormValue(fp *FormParams, key string) string {
26
 func FormValue(fp *FormParams, key string) string {