{"action":"created","issue":{"url":"https://api.github.com/repos/aldeed/meteor-autoform/issues/869","labels_url":"https://api.github.com/repos/aldeed/meteor-autoform/issues/869/labels{/name}","comments_url":"https://api.github.com/repos/aldeed/meteor-autoform/issues/869/comments","events_url":"https://api.github.com/repos/aldeed/meteor-autoform/issues/869/events","html_url":"https://github.com/aldeed/meteor-autoform/issues/869","id":67025745,"number":869,"title":"Field-level CSS class attribute","user":{"login":"SachaG","id":358832,"avatar_url":"https://avatars.githubusercontent.com/u/358832?v=3","gravatar_id":"","url":"https://api.github.com/users/SachaG","html_url":"https://github.com/SachaG","followers_url":"https://api.github.com/users/SachaG/followers","following_url":"https://api.github.com/users/SachaG/following{/other_user}","gists_url":"https://api.github.com/users/SachaG/gists{/gist_id}","starred_url":"https://api.github.com/users/SachaG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SachaG/subscriptions","organizations_url":"https://api.github.com/users/SachaG/orgs","repos_url":"https://api.github.com/users/SachaG/repos","events_url":"https://api.github.com/users/SachaG/events{/privacy}","received_events_url":"https://api.github.com/users/SachaG/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-08T01:24:11Z","updated_at":"2015-04-08T22:50:17Z","closed_at":null,"body":"It'd be useful to have the ability to style specific fields differently. So I was thinking maybe we could have a `autoform.cssClass` attribute in the schema that simply applies a class to a field's container element?"},"comment":{"url":"https://api.github.com/repos/aldeed/meteor-autoform/issues/comments/91058955","html_url":"https://github.com/aldeed/meteor-autoform/issues/869#issuecomment-91058955","issue_url":"https://api.github.com/repos/aldeed/meteor-autoform/issues/869","id":91058955,"user":{"login":"aldeed","id":3012067,"avatar_url":"https://avatars.githubusercontent.com/u/3012067?v=3","gravatar_id":"","url":"https://api.github.com/users/aldeed","html_url":"https://github.com/aldeed","followers_url":"https://api.github.com/users/aldeed/followers","following_url":"https://api.github.com/users/aldeed/following{/other_user}","gists_url":"https://api.github.com/users/aldeed/gists{/gist_id}","starred_url":"https://api.github.com/users/aldeed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aldeed/subscriptions","organizations_url":"https://api.github.com/users/aldeed/orgs","repos_url":"https://api.github.com/users/aldeed/repos","events_url":"https://api.github.com/users/aldeed/events{/privacy}","received_events_url":"https://api.github.com/users/aldeed/received_events","type":"User","site_admin":false},"created_at":"2015-04-08T22:50:17Z","updated_at":"2015-04-08T22:50:17Z","body":"Yeah, any attribute can be in `autoform` and just as if it were in the markup, it will be passed along to the rendered element.\r\n\r\nSo:\r\n\r\n```js\r\n{\r\n  autoform: {\r\n    afFieldInput: {\r\n      class: 'custom'\r\n    }\r\n  }\r\n}\r\n```\r\n\r\nIt will also work to do `{autoform: {class: 'custom'}}` without the `afFieldInput`, but if you don't specify which component the attributes are for, then they're added to all components, which may not be what you want.\r\n\r\nIf you're referring to adding a class to the form group div, then I agree we should add some way to do that. I think there's already an issue for it, but I could be wrong. My thought was to look for `div-` prefixed attributes on `afFormGroup` and add all of those to the div. This would need to be implemented by each afFormGroup theme template, but we may also need some logic in the core to ignore the attributes."}}