# Option on select form helper to customize "Select" text?

**URL:** <https://www.ruby-forum.com/t/option-on-select-form-helper-to-customize-select-text/159894>\
**Category:** Rails\
**Created:** [February 9, 2009, 9:06pm UTC](https://www.ruby-forum.com/t/option-on-select-form-helper-to-customize-select-text/159894 "2009-02-09T21:06:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![weyus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7ab992/32.png) [@weyus](https://www.ruby-forum.com/u/weyus)\
**Post date:** [February 9, 2009, 9:06pm UTC](https://www.ruby-forum.com/t/option-on-select-form-helper-to-customize-select-text/159894/1 "2009-02-09T21:06:29Z")

</div>

All,

Is there any built-in way in the “select” form helper to display  
something other than “Select” in the :include\_blank option?  
Specifically, for a date helper, would like to show “Month”, “Day”,  
“Year” respectively for those options in 3 selects.

Thanks,  
Wes

---

<div class="post-metadata">

**Author:** ![weyus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7ab992/32.png) [@weyus](https://www.ruby-forum.com/u/weyus)\
**Post date:** [February 9, 2009, 11:11pm UTC](https://www.ruby-forum.com/t/option-on-select-form-helper-to-customize-select-text/159894/2 "2009-02-09T23:11:48Z")

</div>

Try this:

script/generate scaffold Thing name:string when:datetime text:body

You’ll see:

In migration:

```
create_table :things do |t|
  t.string :name
  t.datetime :when
  t.text :body
end

```

In view:

# New thing

\<% form\_for(@thing) do |f| %\>  
\<%= f.error\_messages %\>  
.  
.

\<%= f.label :when %\>  
 \<%= f.datetime\_select :when %\>

start your server and check out: localhost:3000/things/new

On Feb 9, 10:06 am, Wes G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![weyus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7ab992/32.png) [@weyus](https://www.ruby-forum.com/u/weyus)\
**Post date:** [February 10, 2009, 12:02am UTC](https://www.ruby-forum.com/t/option-on-select-form-helper-to-customize-select-text/159894/3 "2009-02-10T00:02:43Z")

</div>

Rick,

Thanks, but not what I’m looking for.

Wes

---

<div class="post-metadata">

**Author:** ![weyus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7ab992/32.png) [@weyus](https://www.ruby-forum.com/u/weyus)\
**Post date:** [February 10, 2009, 12:51am UTC](https://www.ruby-forum.com/t/option-on-select-form-helper-to-customize-select-text/159894/4 "2009-02-10T00:51:56Z")

</div>

On Feb 9, 8:06 pm, Wes G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> All,
> 
> Is there any built-in way in the “select” form helper to display  
> something other than “Select” in the :include\_blank option?  
> Specifically, for a date helper, would like to show “Month”, “Day”,  
> “Year” respectively for those options in 3 selects.

If the :include\_blank option is a string then that is used for the  
blank option. There’s also the :prompt option. I do recall that  
support of this with the date\_select stuff was only added recently.

Fred

---

<div class="post-metadata">

**Author:** ![weyus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7ab992/32.png) [@weyus](https://www.ruby-forum.com/u/weyus)\
**Post date:** [February 10, 2009, 1:24am UTC](https://www.ruby-forum.com/t/option-on-select-form-helper-to-customize-select-text/159894/5 "2009-02-10T01:24:02Z")

</div>

Fred,

Thanks for the info. I neglected to mention that this is on Rails 1.2.6  
(please no one “helpfully suggest” that I upgrade - thanks ;]), so these  
options are not available. It’s fine - I won’t die.

One further question, if you use a “unified” helper like date\_select in  
the current v. of Rails (obviously), can you set different promopts for  
each component input field of the date?

Wes
