# Search form: field list in a drop down

**URL:** <https://www.ruby-forum.com/t/search-form-field-list-in-a-drop-down/173754>\
**Category:** Rails\
**Created:** [August 14, 2009, 7:56am UTC](https://www.ruby-forum.com/t/search-form-field-list-in-a-drop-down/173754 "2009-08-14T07:56:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![railslist](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/65b543/32.png) [@railslist](https://www.ruby-forum.com/u/railslist)\
**Post date:** [August 14, 2009, 7:56am UTC](https://www.ruby-forum.com/t/search-form-field-list-in-a-drop-down/173754/1 "2009-08-14T07:56:18Z")

</div>

i am developing a search form where the user need to select the field to  
be searched from a drop down.

could some one provide me pointers?.

---

<div class="post-metadata">

**Author:** ![railslist](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/65b543/32.png) [@railslist](https://www.ruby-forum.com/u/railslist)\
**Post date:** [August 14, 2009, 2:48pm UTC](https://www.ruby-forum.com/t/search-form-field-list-in-a-drop-down/173754/2 "2009-08-14T14:48:58Z")

</div>

Rails L. wrote:

> i am developing a search form where the user need to select the field to  
> be searched from a drop down.
> 
> could some one provide me pointers?.

Look at ‘collection\_select’ and update a div with a partial, as needed?  
Maybe not the best idea…

---

<div class="post-metadata">

**Author:** ![railslist](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/65b543/32.png) [@railslist](https://www.ruby-forum.com/u/railslist)\
**Post date:** [August 14, 2009, 2:57pm UTC](https://www.ruby-forum.com/t/search-form-field-list-in-a-drop-down/173754/3 "2009-08-14T14:57:11Z")

</div>

Aldric G. wrote:

> Rails L. wrote:
> 
> > i am developing a search form where the user need to select the field to  
> > be searched from a drop down.
> > 
> > could some one provide me pointers?.
> 
> Look at ‘collection\_select’ and update a div with a partial, as needed?  
> Maybe not the best idea…

hey thanks. exactly thats what i am trying now…like this

\<%=  
options\_for\_select([[“Title”,“title”],[“Description”,“description”],[“Ad  
Type”,“adtype”],[“Email”,“email”],[“Location”,“location”]]) %\>
