func (f *FieldSetType) Render() template.HTML {
	return template.HTML(f.render())
}
Render translates a FieldSetType into HTML code and returns it as a template.HTML object.
package forms
import (
	"bytes"
	"html/template"
	"strconv"
	"strings"
	"github.com/coscms/forms/common"
	"github.com/coscms/forms/config"
	"github.com/coscms/forms/fields"
)
type FieldSetType struct {
	OrigName   string                  `json:"origName" xml:"origName"`
	CurrName   string                  `json:"currName" xml:"currName"`
	Label      string                  `json:"label" xml:"label"`
	LabelCols  int                     `json:"labelCols" xml:"labelCols"`
	FieldCols  int                     `json:"fieldCols" xml:"fieldCols"`
	Classes    common.HTMLAttrValues   `json:"classes" xml:"classes"`
	Tags       common.HTMLAttrValues   `json:"tags" xml:"tags"`
	FieldList  []fields.FieldInterface `json:"fieldList" xml:"fieldList"`
	AppendData map[string]interface{}  `json:"appendData,omitempty" xml:"appendData,omitempty"`
	FormTheme  string                  `json:"formTheme" xml:"formTheme"`
	Language   string                  `json:"language,omitempty" xml:"language,omitempty"`
	Template   string                  `json:"template" xml:"template"`
	fieldMap   map[string]int
	data       map[string]interface{}
}
func (f *FieldSetType) SetData(key string, value interface{}) {
	f.AppendData[key] = value
}
func (f *FieldSetType) SetLabelCols(cols int) {
	f.LabelCols = cols
}
func (f *FieldSetType) SetFieldCols(cols int) {
	f.FieldCols = cols
}
func (f *FieldSetType) SetName(name string) {
	f.CurrName = name
}
func (f *FieldSetType) OriginalName() string {
	return f.OrigName
}
func (f *FieldSetType) Data() map[string]interface{} {
	if len(f.data) > 0 {
		return f.data
	}
	f.data = map[string]interface{}{
		"container": "fieldset",
		"name":      f.CurrName,
		"label":     f.Label,
		"labelCols": f.LabelCols,
		"fieldCols": f.FieldCols,
		"fields":    f.FieldList,
		"classes":   f.Classes,
		"tags":      f.Tags,
	}
	for k, v := range f.AppendData {
		f.data[k] = v
	}
	return f.data
}
func (f *FieldSetType) render() string {
	buf := bytes.NewBuffer(nil)
	tpf := common.TmplDir(f.FormTheme) + "/" + f.FormTheme + "/" + f.Template + ".html"
	tpl, err := common.GetOrSetCachedTemplate(tpf, func() (*template.Template, error) {
		return common.ParseFiles(common.LookupPath(tpf))
	})
	if err != nil {
		return err.Error()
	}
	err = tpl.Execute(buf, f.Data())
	if err != nil {
		return err.Error()
	}
	return buf.String()
}