Css question


I’m doing this ‘partial’ to do some ajax auto_complete

    <% for client in @clients do -%>
  • <%=h client.clwholename %>
    <%= client.id %>
  • <% end -%>

and my understanding was that would make the
element inside ‘hidden’ but that isn’t the case as it is visible.

so I added a class to the stylesheet the document is using…

.informal {
visibility : hidden;

and saved it but still the data inside is visible.

Is there something I am still missing?


    <% for client in @clients do -%>
  • <%=h client.clwholename %>
    <%= client.id %>
  • <% end -%>

You are missing a parenthesis in the '<div class="id ’ tag after the
“id” property



On Fri, 2006-03-10 at 09:08 +0100, Matthias von Rohr wrote:

duh - good catch…interesting that it worked at all. In fact, fixing it
breaks it and I think I can finally ask an intelligent question about

I am returning client.id to my form (whether visible or not is probably
not meaningful at the moment).

I want to submit this value obtained via ajax/auto_complete with my

If I add
<%= hidden_field ‘placement’,‘id’ %>
immediately after
<%= text_field_with_auto_complete :placement, :clwholename, {} %>

the POST includes

Processing PlacementsController#findresult (for at 2006-03-10
06:53:14) [POST]
Parameters: {“commit”=>“Find”, “action”=>“findresult”,
“controller”=>“placements”, “placement”=>{“id”=>"",
“beg_referral_date”=>"", “clwholename”=>“George Washington”}}

so the value returned is blank for ‘id’ but clearly there for

Obviously this ‘id’ value is returning to the form via autocomplete, I
can see it there both on screen (until I set css invisible) and in DOM
inspector where it shows up as a

with node_value of “id” just
below the
with node_value of “clwholename” but I need that value
returned when I ‘POST’ the form.

any clues?



On Fri, 2006-03-10 at 07:10 -0700, Craig W. wrote:

One more time at this because someone knows the answer to this and I’m
not getting it.

using text_field_with_auto_complete

It searches db fine, returns with list of 2 related
columns…clwholename and id

It returns to the calling form by way of a partial that has 2

separate class names (see below for actual code)

Both values return to web app and can be seen inside same

  • (via DOM
    inspector) as separate
    with their respective NodeValues and text
    values (the part I want).

    But when the form is POSTed, I get the value from
    <%= text_field_with_auto_complete :placement, :clwholename, {} %>
    But not from
    <%= hidden_field ‘placement’, ‘id’ %>
    <%= hidden_field :placement, :id %>

    In essence, I want the ‘id’ from the auto_complete selection to tag
    along with the post so I don’t have to look it up again afterwards
    because that is too painful.