Answers.Body: <p>You should be using <code>forms.radioGroupField</code> instead of <code>forms.radioGroup</code>, just like you're using <code>forms.lightswitchField</code>.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-19T04:48:29.883Z
Answers.LastActivityDate: 2015-06-19T04:48:29.883Z
Answers.UserDisplayName: Brad Bell
Body: <p>I am trying to learn how to create plugins using craft and am having a small problem.</p>
  
  <p>On the templates/settings.html page I have the following code:</p>
  
  <pre><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
  }) }}
  </code></pre>
  
  <p>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:</p>
  
  <p><img src="https://content.screencast.com/users/SEMCourses/folders/Jing/media/17547054-15e7-4b7b-aec2-ab25656ba297/2015-06-19_0202.png" alt="screenshot"></p>
  
  <p>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?</p>
  
  <p>Thanks,</p>
  
  <p>Moshe</p>
  
Tags: <plugin-development><lightswitch><settings>
Title: Problems Displaying Label and Instructions in Forms
ThreadText: # Problems Displaying Label and Instructions in Forms
  
  (Asked by: username_0 on 2015-06-18)
  
  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:
  
  ![screenshot](https://content.screencast.com/users/SEMCourses/folders/Jing/media/17547054-15e7-4b7b-aec2-ab25656ba297/2015-06-19_0202.png)
  
  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,
  
  username_0
  
  **Tags:** plugin-development, lightswitch, settings
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-06-19. Score: 2 | Accepted answer
  
  You should be using `forms.radioGroupField` instead of `forms.radioGroup`, just like you're using `forms.lightswitchField`.
  
  
  ---
  
  