I am trying to learn how to create plugins using craft and am having a small problem.
On the templates/settings.html page I have the following code:
{% import "_includes/forms" as forms %}
{{ forms.lightswitchField({
label: "Lightswitch Label"|t,
instructions: "Lightswith Instructions"|t,
name: 'lightSwitchName',
on: settings.lightSwitchName,
}) }}
{{ forms.radioGroup({
label: "Radio Group Label"|t,
instructions: "Radio Group Instructions"|t,
name: 'radioGroupName',
options:{ "option_1" : "option_1", "option_2" : "option_2"},
value: settings.radioGroupName
}) }}
What is interesting is that on the settings page for this plugin (in the admin control panel) the label and instructions only show up for lightswitch field and not for the radio group. Here is a screen shot:
Am I doing something wrong? Is there a way to display a title and instructions for a radiogroup? If so, can someone please tell me how?
Thanks,
Moshe