title: Kivy How to set ToggleButton groups
body: <p>Would someone please be willing to explain why the group name from a Kivy ToggleButton has to be the name of one of the id's from a buttons in the group?</p>
  
  <p>I had an issue and struggled with it, ultimately finding that the only solution is to use the id name of one of the buttons or else the interpreter says group name not defined. I don't understand why.  I've looked in the Kivy Docs and I can't find anything about groups themselves.  It only says that Toggle Buttons can use groups to create radio-button style activity.
  I'm using Kivy 1.10.0 and Python 3.6.2</p>
  
  <p>I've recreated the problem below.  I'd be most grateful for any insight into this.  </p>
  
  <pre><code>from kivy.app import App
  from kivy.uix.button import Button
  from kivy.uix.boxlayout import BoxLayout
  from kivy.uix.togglebutton import ToggleButton
  
  class toggling(BoxLayout):
      pass
  
  class togglingApp(App):
      pass
  if __name__ == "__main__":
      togglingApp().run()
  </code></pre>
  
  <p>The kv file:</p>
  
  <pre><code>toggling:
  
      &lt;toggling&gt;:
          orientation: "vertical"
          padding: 5
          spacing: 5
          BoxLayout:
              size_hint_y: None
              height: "40dp"
  
              Label:
                  text: "Title"
          BoxLayout:
              size_hint_y: None
              height: "40dp"
  
              Label:
                  size_hint_x: None
                  width: "100dp"
                  text: "Firstly"
  
              ToggleButton:
                  text:"A1"
                  group: a1
                  id: a1
                  on_press:
              ToggleButton:
                  text:"A2"
                  group: a1
                  id: faulty
                  on_press:
  
          BoxLayout:
              size_hint_y: None
              height: "40dp"
              Label:
                  size_hint_x: None
                  width: "100dp"
                  text: "Secondly"
              ToggleButton:
                  text:"B1"
                  id: b1
                  group: the_b_group
                  on_press:
  
              ToggleButton:
                  text:"B2"
                  id: b2
                  group: the_b_group
                  on_press:
  
              ToggleButton:
                  text:"B3"
                  id: b3
                  group: the_b_group
                  on_press:
  
          BoxLayout:
  </code></pre>
  
  <p>background (if needed):</p>
  
  <p>My question arises from an error stating that my ToggleButton group name was not defined.  I had some ToggleButtons which worked as expected and then I tried to copy and paste a similar set of buttons to a new row, and edit the labels.  This action killed the app.  It would not run and it said that my group name (for the new set of buttons) was not defined.</p>
  
  <p>I am trying to create a data collection app which is a series of categories, each series having 2-5 toggle buttons.  The idea is to tap one button in each group, the data from each to populate a listview and ultimately file in a database.</p>
  
  <p>Admittedly, my Python skills are weak, I've only been at this a few months, but my kivy skills are weaker.  Kivy is really great, but for whatever reason, I just find Kivy to be completely opaque, I don't usually get what it's doing.  Thanks for your help.</p>