Set Certain Select Options As Disabled Using Simple Form
Posted by Weston Ganger
I needed to disable a bunch of select options on my select box in my
Simple form has an easy way to do this:
= f.association :countries, collection: ['Canada','USA','Mexico','Russia'], disabled: ['Russia','Mexico']
Now all of the options will still show in the list but only Canada and USA will be selectable.
Related External Links: