Hello is it possible adding the option "disabled" to a text_field helper according to the selected value of a select ? I guess I have to use javascript with the change event but i don't know how.

I have the model "category" with a boolean attribute "requires_description"
in My wiew I have a select with the list of my categories and a text_field and I would like that this text_field was disabled only when the selected category doesn't require description (category.requires_description = false).

I hope it is clear enough.

Thanks for the help and have a nice day!