Collection_select default


#1

Hi,

I have a form where i have two drop down lists formed by using the
collection_select helper.

I need the second list “selected” item to change depending on what was
selected in the first list. I am currently using an onChange ajax call
when the first list is changed, but I cannot get the second lists
default value to change.

I have read that if I set the @variable.attribute this will be the
default selected item, but for some reason this only seems to work with
select lists and not collection_select. Is there a way to make one of
the items selected in the list?

Thanks,
Ryan L.