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

Style customization for alpaca forms #553

Closed ghost closed 6 years ago

ghost commented 6 years ago

Hello,

How can I customize the default button styles on the generated form? Is there an api for that or is it better to override the existing styles? I noticed that alpaca is using its own custom classes built on top of bootstrap. So I'm guessing those styles will need to be overridden. Can you please let me know what is the best way to go about this?

Thanks, Akshat

ambischof commented 6 years ago

If I understand you correctly, you want to be able to change the classes, correct?

You need to override the view's styles: http://www.alpacajs.org/docs/api/views.html#toc_5

Here is the code that sets the default bootstrap-edit's button classes. https://github.com/gitana/alpaca/blob/master/src/js/views/bootstrap.js#L26

ghost commented 6 years ago

Thanks @ambischof View styles is exactly what I was looking for!