I want to disable an HTML DropDown in Rails, and I found this solution: how to disable the entire dropdown control in html
So, I have this:
f.select( ...., :disabled => true)
But, the problem is, when the DropDown is disabled, it does not show in the params collection.
EDIT:
This is my situation:
I have a form with a text_field and a select field. There are two cases:
- The user creates a new item directly. If so, she will choose a category from the select field.
- The user creates a new item, after redirecting from a category page. In this case, the select field is set to the value of the category, and should be disabled.
Does anyone have any idea how to fix this?