# Getting value from collection\_select

**URL:** <https://www.ruby-forum.com/t/getting-value-from-collection-select/144457>\
**Category:** Rails\
**Created:** [July 29, 2008, 8:28pm UTC](https://www.ruby-forum.com/t/getting-value-from-collection-select/144457 "2008-07-29T20:28:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jdrietz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/5f8ce5/32.png) [@jdrietz](https://www.ruby-forum.com/u/jdrietz)\
**Post date:** [July 29, 2008, 8:28pm UTC](https://www.ruby-forum.com/t/getting-value-from-collection-select/144457/1 "2008-07-29T20:28:15Z")

</div>

Hi,

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

How do I get the value of the list?

In my observe\_field, :with =\> ??

Thanks!
