Hi, What I use rails form helpers to build a form, input elements in that form have id attributes so they can match with their labels. The problem is this id is the something like person_first_name
and not person_first_name_#{person.id}
meaning if I have more than one form of the same type on the same page unexpected things can happen.
A perfect example of this is using jquery-ui datepicker. I have a series of forms all containing a text_field element wrapped in a div with the class datepicker. I apply the datepicker like this (in document ready) $('.datepicker input').datepicker(options)
and guess what, every one of these elements, although has a seemingly working datepicker (click on input, datepicker appears), although when a date is selected in any of these datepickers only the first element on the page (of that element type, ex. input id=published_on) gets updated with the value.
Any suggestions on getting rails to output more unique element id's or make datepicker not use the id attribute?