title: Using auto generated (ie random) IDs in HTML forms
body: <p>I'm creating a form from various complex controls that I have built as Backbone views. Understandably I want to reliably link the labels to the <code>&lt;input&gt;</code> elements, which I am doing with the normal <code>for</code> attribute.</p>
  
  <p>However, sometimes I need to use the same control multiple times. I am using data attributes to drive the form, so I do not need the <code>id</code> attribute for my own use, and can use classes to identify each control.</p>
  
  <p>Therefore, I am considering whether it makes sense to generate random ids, just to link the <code>&lt;label&gt;</code> and <code>&lt;input&gt;</code> together? This seems a really bad idea, but I am unsure there is a better one?</p>
  
  <p>I can't just put the <code>&lt;input&gt;</code> inside the <code>&lt;label&gt;</code>, as they have to be separate from each other.</p>