# Getting value of collection\_select

**URL:** <https://www.ruby-forum.com/t/getting-value-of-collection-select/144563>\
**Category:** Rails\
**Created:** [July 30, 2008, 11:21pm UTC](https://www.ruby-forum.com/t/getting-value-of-collection-select/144563 "2008-07-30T23:21:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jturney](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e99b99/32.png) [@jturney](https://www.ruby-forum.com/u/jturney)\
**Post date:** [July 30, 2008, 11:21pm UTC](https://www.ruby-forum.com/t/getting-value-of-collection-select/144563/1 "2008-07-30T23:21:24Z")

</div>

\<%= collection\_select(:post, :id, @posts, :id, :title, options ={:prompt  
=\> “-Select categories-”}, :class=\>“category\_dropdown\_list”) %\>

Hi, how would I send the value of the selected item in the  
collection\_select?

I’m trying to use an observe\_field for an input, and in the action I’ll  
perform the steps corresponding to the collection\_select.

Thanks
