Beispiel #1
0
func (r *FormRenderer) EndInput(w io.Writer, field *form.Field, pos int) error {
	var err error
	if field.HasAddOns() && pos == -1 {
		_, err = io.WriteString(w, "</div>")
	}
	return err
}
Beispiel #2
0
func (r *FormRenderer) BeginInput(w io.Writer, field *form.Field, placeholder string, pos int) error {
	var err error
	if field.HasAddOns() && pos == -1 {
		div := html.Div()
		div.Attrs = html.Attrs{"class": "input-group"}
		div.Open = true
		_, err = div.WriteTo(w)
	}
	return err
}