gitana / alpaca

Alpaca provides the easiest way to generate interactive HTML5 forms for web and mobile applications. It uses JSON Schema and simple Handlebars templates to generate great looking, dynamic user interfaces on top of Twitter Bootstrap, jQuery UI, jQuery Mobile and HTML5.
http://www.alpacajs.org
Other
1.29k stars 371 forks source link

How to make a toggle? #614

Open Lorengamboa opened 6 years ago

Lorengamboa commented 6 years ago

Hi folks!

Im looking foward to make a toggler. Therefore I'll probably need a set of elements tied up so they can make a nice and robust html toggler.

The problem is that most of css toggler cant be made by just adding a class to a radiobutton becouse it needs an extra html element which it will be tied to, to make it possible. Does alpaca give me the possibility to inject html through the alpaca schema?

Thanks alot!

ambischof commented 6 years ago

I'm not exactly sure what you're trying to make, but it sounds like you'd like to be able to change the html that is being generated, correct?

If so, look into overriding some of the templates: http://www.alpacajs.org/docs/api/templates.html