I'm sorry that this question is somewhat complicated. Hopefully someone has the patience to read this.
I have a nested model form much like the one from this Railscast: http://railscasts.com/episodes/196-nested-model-form-revised
My model is very similar to the nested form field in the Railscast. There is a survey with many questions which has many answers.
I am applying a jQuery-UI "Autocomplete" element to make all of the answer form fields an autocomplete element. However, because it is a nested form field, there are many answer fields in my document. This wouldn't be a problem typically but I need to apply this solution in displaying the label but submitting the ID of the autocomplete selection. Autocomplete applying value not label to textbox
What happens when I employ the solution in the link above, is that the label gets applied to every single "Answer Form Field" in my document rather than just the one that I want. Because I'm using nested forms and I have to apply autocomplete logic to every single "Answer Form Fields," I have to select them by this selector '[type="text"][name*="[answer]"]' which isn't very specific but its as specific as I can be.
I'm racking my brain to figure out how I can use a jQuery selector to select a specific answer field rather than all of the answer fields.
Thank you in advanced for any help at all.