Passing a value in a hidden field inside a form

should be trivial but I can’t figure this out from api

<%= hidden_field ‘certifications’, ‘personnel_id’, {value =
#{@personnel.id}} %>

I want to pass the value of ‘id’ field in my form to the certifications
controller as personnel_id

Craig

On Sun, Jun 04, 2006 at 06:46:09AM -0700, Craig W. wrote:

should be trivial but I can’t figure this out from api

<%= hidden_field ‘certifications’, ‘personnel_id’, {value =
#{@personnel.id}} %>

Not sure whether hidden_field is supposed to work like that, but your
syntax
is way off. Try this instead:

<%= hidden_field ‘certifications’, ‘personnel_id’, :value =>
@personnel.id
%>

  • Matt


When I was a kid I used to pray every night for a new bicycle. Then I
realised that the Lord doesn’t work that way so I stole one and asked
Him to
forgive me.
– Emo Philips.

On Sun, 2006-06-04 at 23:56 +1000, Matthew P. wrote:

%>


perfect - thanks - I tried to get too complicated

Craig