Browse Source

Modified definition of the Form interface.

Wirecog 6 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,10 +13,14 @@ import (
13 13
 
14 14
 type Form interface {
15 15
 	Validate() bool
16
-	AutofillFields() []string
17 16
 	Fields() map[string]string
18 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 26
 func FormValue(fp *FormParams, key string) string {