FormValue

Any form values can be retrieved by name, the first value from the given key is returned.

  1. c.FormValue(name string) string
  1. app.Post("/", func(c *fiber.Ctx) {
  2. // Get first value from form field "name":
  3. c.FormValue("name")
  4. // => "john" or "" if not exist
  5. })

Returned value is only valid within the handler. Do not store any references.
Make copies or use the
Immutable setting instead. Read more…