# Related selects w/ defaults from session

**URL:** <https://www.ruby-forum.com/t/related-selects-w-defaults-from-session/114095>\
**Category:** Rails\
**Created:** [September 7, 2007, 8:25pm UTC](https://www.ruby-forum.com/t/related-selects-w-defaults-from-session/114095 "2007-09-07T20:25:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![peterbe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/bc79bd/32.png) [@peterbe](https://www.ruby-forum.com/u/peterbe)\
**Post date:** [September 7, 2007, 8:25pm UTC](https://www.ruby-forum.com/t/related-selects-w-defaults-from-session/114095/1 "2007-09-07T20:25:32Z")

</div>

I have a series of 3 or 4 related select boxes (contents of 2nd  
dependent on selection in 1st,  
contents of 3rd dependent on selection in 2nd and so on). I’m  
implementing it using observe\_field  
on each select box and it works fine.

I want to remember what each user selects and pre-select an item in  
each pulldown based on  
his/her session. I’m storing the session data and can pre-select an  
item in the first select box.  
The second select box does not populate however, because there’s no  
event fired from the  
first select box.

How can I manually fire an event from the first select box which  
triggers the population of the  
second box?

Thanks,  
Peter
