Rails form - Only submit the visible element (2x element with same id)
i got this:
A form with 2 select fields, both of them have the same id. I want that only the visible one gets submitted. Is there an solution for? Like adding an attribute to the element so that rails know?
Duplicate id on same page is very bad practice. I suggest you to change them to unique ids instead of hacking a solution.