GetStrings action as GetString
Showing
1 changed file
with
3 additions
and
3 deletions
| ... | @@ -308,11 +308,11 @@ func (c *Controller) GetString(key string) string { | ... | @@ -308,11 +308,11 @@ func (c *Controller) GetString(key string) string { |
| 308 | // GetStrings returns the input string slice by key string. | 308 | // GetStrings returns the input string slice by key string. |
| 309 | // it's designed for multi-value input field such as checkbox(input[type=checkbox]), multi-selection. | 309 | // it's designed for multi-value input field such as checkbox(input[type=checkbox]), multi-selection. |
| 310 | func (c *Controller) GetStrings(key string) []string { | 310 | func (c *Controller) GetStrings(key string) []string { |
| 311 | r := c.Ctx.Request | 311 | f := c.Input() |
| 312 | if r.Form == nil { | 312 | if f == nil { |
| 313 | return []string{} | 313 | return []string{} |
| 314 | } | 314 | } |
| 315 | vs := r.Form[key] | 315 | vs := f[key] |
| 316 | if len(vs) > 0 { | 316 | if len(vs) > 0 { |
| 317 | return vs | 317 | return vs |
| 318 | } | 318 | } | ... | ... |
-
Please register or sign in to post a comment