import "github.com/kataras/iris/v12"
app.RegisterView(iris.HTML("./templates", ".html"))
app.Post("/", handleForm)
func showForm(ctx iris.Context) {
type formExample struct {
Colors []string `form:"colors[]"` // or just "colors".
func handleForm(ctx iris.Context) {
err := ctx.ReadForm(&form)
ctx.StopWithError(iris.StatusBadRequest, err)
ctx.JSON(iris.Map{"Colors": form.Colors})