# Css selectors and ActionView::FormHelper

**URL:** <https://www.ruby-forum.com/t/css-selectors-and-actionview-formhelper/161495>\
**Category:** Rails\
**Created:** [February 26, 2009, 10:57pm UTC](https://www.ruby-forum.com/t/css-selectors-and-actionview-formhelper/161495 "2009-02-26T22:57:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![byrnejb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Post date:** [February 26, 2009, 10:57pm UTC](https://www.ruby-forum.com/t/css-selectors-and-actionview-formhelper/161495/1 "2009-02-26T22:57:54Z")

</div>

Rails 2.2.2

In a view partial, When I do this:

```
  <%= label client_detail.class.to_s.downcase,
            :client_credit_limit,
            "Credit Limit: ",
            :class => :input_box_label,
            :for => 'input_client_credit_limit
  -%>

  <%= ff.text_field :client_credit_limit,
        :id => 'input_client_credit_limit',
        :size => 12,
        :value => client_detail.client_credit_limit
  -%>
</p>

```

Then I see this:

```
  <label class="input_box_label"
     for="input_client_credit_limit">
     Credit Limit:
  </label>

  <input
     id="input_client_credit_limit"
     name="client[client_credit_limit]"
     size="12" type="text" value="0" />

```

But, when I do this:

```
<%= label :client,
          :client_credit_policy,
          "Credit Policy",
          :class => :input_box_label
-%>

<%= ff.select :client_credit_policy,
          [['CASH - Advance Billing', 'CASH'],
            ['OPEN - Open Account', 'OPEN'],
          ],
          :prompt => 'Select Credit Policy Code',
          :size => 4
-%>

```

Then I see this:

```
<label
  class="input_box_label"
  for="select_client_credit_policy">
  Credit Policy
</label>

<select
   id="client_client_credit_policy"
   name="client[client_credit_policy]">
   <option value="CASH" selected="selected">
      CASH - Advance Billing</option>
   <option value="OPEN">
      OPEN - Open Account</option>
</select>

```

Select does not honour the :id =\> ‘text’ option when provided. Instead  
it creates an id of the form \_. However, text\_field  
does honour the :id =\> ‘text’ option if given.

Is this a bug?
