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

fieldClass on topmost field container? #658

Open madze opened 6 years ago

madze commented 6 years ago

I've found that the 'fieldClass' property in options is a fantastic tool for styling forms, although I have run into some cases where it seems like maybe it could be optimized a little.

Currently it appears to assign custom classes to the div.alpaca-field wrapping the input field. -However, in cases where that is inside of a div.alpaca-container-item it would be super helpful to have it assigned to this element instead so you could target the topmost element that is specific to the field rather than one in the middle.

Unless of course I'm just missing something...

Thanks a bunch!