From dodds at united-domains.de Mon Jul 28 15:06:49 2014 From: dodds at united-domains.de (Stuart Dodds) Date: Mon, 28 Jul 2014 17:06:49 +0200 Subject: [html-formfu] default style for options in a radiogroup Message-ID: <53D66709.80403@united-domains.de> Hi, I am currently trying to set the (bootstrap) style for the options in a Radiogroup but having trouble adding an attribute class to the tag for each option. I would like the form output to look like this:
sex
I know it is possible to manually set an option container attribute as follows: elements: - type: Radiogroup name: sex label: sex options: - [ 'm', 'Male' ] - [ 'f', 'Female' ] - value: a label: Alien container_attributes: <------------- here class: radio however I would like this attribute to be applied to all options automatically since I am actually retrieving the options dynamically from the database rather than setting them manually in the form config. I tried fiddling with the layout in the default_args hash but all I could manage to change were the outer elements of the Radiogroup rather than the inner which wrap around the options themselves. Any assistance with this would be greatly appreciated. Stuart.