package html

import (
	"net/http"
)

func BoolFromForm(r *http.Request, k string) bool {
	s := r.PostFormValue(k)
	return s == "on"
}

func PostFormValueOrNone(r *http.Request, k string) string {
	v := r.PostFormValue(k)
	if v == "" {
		return "none"
	}
	return v
}
