Giter VIP home page Giter VIP logo

form's People

Contributors

joncalhoun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

form's Issues

Add internationalization support to struct/form labels

Form labels only support single languages (from what I see...). Perhaps label could be extended to support multiple languages.
It could look something like this:

Now:

type address struct {
	Street1 string
	Street2 string
	City    string
	State   string
	Zip     string ``form:"label=Postal Code"`
}

Perhaps this could be changed to something like:

type address struct {
	Street1 string
	Street2 string
	City    string
	State   string
	Zip     string `form:"label.en=Postal Code,label.fr=Code Postal,label.jp=郵便番号" `
}

Dynamic option values for a select?

Hey thanks for this package! It's working well for most of my project, but I just wanted to be able to pass in a slice of ints or a strings or something and be able to generate option values for a select.. Any hints on how you might accomplish that? I'm kinda stumped. I can see how I could make them static by defining a "select" type, but it'd be cool if I could pass in a list too.

Thanks!

reflect.Value.Interface: cannot return value obtained from unexported field or method

Hi,

I'm trying to use your librayr to generate a form for Config struct.

I get this error I don't quite know how to debug yet:

template: manage:10:18: executing "content" at <inputs_for .Config>: error calling inputs_for: reflect.Value.Interface: cannot return value obtained from unexported field or method

Here is what I'm trying to generate a form for:

https://github.com/prologic/twtxt/blob/75cccfa29e6c31980fb98ee1e3772207a0fda28c/internal/config.go#L15

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.