I'd like to style the component options page of my custom-developed component. I can see in the Articles
com_config options there are coloured buttons for radio buttons and a nicer page layout (e.g. equal-width columns for labels and form fields). How can I customise this for my own component options screen within com_config
?
-
Have you done anything to try and get the parameter value from com_config?– LodderAug 2, 2014 at 16:56
2 Answers
Add your fields like this in the XML manifest file:
<field
name="language"
type="radio"
class="btn-group"
default="en"
label="Language"
description="What language do you want?">
<option
value="en">English</option>
<option
value="es">Spanish</option>
<option
value="no">Norwegian</option>
</field>
For simple Yes/No buttons, try
<field
name="intro"
type="radio"
class="btn-group btn-group-yesno"
default="1"
label="Introduction"
description="Show introduction?">
<option
value="1">JYES</option>
<option
value="0">JNO</option>
</field>
-
1A-ha -
class
is not documented in docs.joomla.org/Radio_form_field_type. I saw thebtn-group-yesno
CSS classes in the Dev Tools but wasn't sure how to add. Cheers! Aug 2, 2014 at 18:01
If you're using Joomla 3, set class="btn-group"
to your radio buttons, that should style them like the default Joomla radio buttons.