title: Can someone explain Rails behavior for multiple fields with identical names and ids?
body: <p>I needed to create a input mask for a jQuery datepicker in my Rails app, where the first form field uses m/d/yy format and the datepicker populates a hidden input with the proper database format.</p>
  
  <p>I was using SimpleForm, and so I extended my own input so that the input is preceded by the mask.</p>
  
  <p>I got everything set up and when checking out the browser, it all just worked well before I thought I would be done.</p>
  
  <p>The form ends up with two inputs for the same attribute, each with the same id and name. I never thought this would work. Checking the development log I only see one date getting submitted, the second of the two which is the one that has the proper format for the database.</p>
  
  <p>Is this all okay? Should I take some extra steps even though this appears to work fine, and more importantly, can someone explain what's going on under the hood that results in this behavior?</p>
  
  <p>Thanks!!</p>