From 84b6bef7d064371365822d60928e163f54988b0d Mon Sep 17 00:00:00 2001 From: Joshua Santos Date: Tue, 28 Jun 2016 16:39:09 -0700 Subject: [PATCH] Required field useful for not only input --- templatefunc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templatefunc.go b/templatefunc.go index 827c9b6b..d6afaf15 100644 --- a/templatefunc.go +++ b/templatefunc.go @@ -450,7 +450,7 @@ func renderFormField(label, name, fType string, value interface{}, id string, cl return fmt.Sprintf(`%v`, label, id, class, name, fType, value, requiredString) } - return fmt.Sprintf(`%v<%v%v%v name="%v">%v`, label, fType, id, class, name, value, fType) + return fmt.Sprintf(`%v<%v%v%v name="%v"%v>%v`, label, fType, id, class, name, requiredString, value, fType) } // isValidForInput checks if fType is a valid value for the `type` property of an HTML input element.