formcommon

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2014 License: MIT Imports: 6 Imported by: 9

Documentation

Overview

This package provides basic constants used by go-form-it packages.

Index

Constants

View Source
const (
	BUTTON         = "button"
	CHECKBOX       = "checkbox"
	COLOR          = "color" // Not yet implemented
	DATE           = "date"
	DATETIME       = "datetime"
	DATETIME_LOCAL = "datetime-local"
	EMAIL          = "email" // Not yet implemented
	FILE           = "file"  // Not yet implemented
	HIDDEN         = "hidden"
	IMAGE          = "image" // Not yet implemented
	MONTH          = "month" // Not yet implemented
	NUMBER         = "number"
	PASSWORD       = "password"
	RADIO          = "radio"
	RANGE          = "range"
	RESET          = "reset"
	SEARCH         = "search" // Not yet implemented
	SUBMIT         = "submit"
	TEL            = "tel" // Not yet implemented
	TEXT           = "text"
	TIME           = "time"
	URL            = "url"  // Not yet implemented
	WEEK           = "week" // Not yet implemented
	TEXTAREA       = "textarea"
	SELECT         = "select"
	STATIC         = "static"
)

Input field types

View Source
const (
	BASE      = "base"
	BOOTSTRAP = "bootstrap3"
)

Available form styles

View Source
const (
	PACKAGE_NAME = "github.com/coscms/forms"
)

Variables

View Source
var (
	TmplDir string              = "templates"
	LabelFn func(string) string = func(s string) string {
		return s
	}
)

Functions

func CachedTemplate

func CachedTemplate(cachedKey string) (r *template.Template, ok bool)

func ClearCachedTemplate

func ClearCachedTemplate()

func CreateUrl

func CreateUrl(widget string) string

CreateUrl creates the complete url of the desired widget template

func SetCachedTemplate

func SetCachedTemplate(cachedKey string, tmpl *template.Template) bool

func Tag

func Tag(t reflect.Type, fieldNo int, tagName string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL