Preload form fields with vaiables

I have the following for which uses javascript to preload a couple of
fields but it doesn’t work on a Blackberry (even IF javascript is
enabled there). Is there a non-javascript way of preloading the fields
I have in my form below? Thanks, Janna

Send Email

<% form_remote_tag :update => 'Body', :url => {:controller => 'emailer', :action => 'sendmail'}, :html => {:name => 'form'+(params [:id]).to_s} do %>

Subject: <%= text_field 'email', 'subject' %>

Recipient: <%= text_field 'email', 'recipient', :readonly => 'true' %>

Message
<%= text_area 'email', 'message' %>

<%= submit_tag "Send"%> <% end %>

On 13 Jun 2009, at 13:36, JannaB [email protected] wrote:

I have the following for which uses javascript to preload a couple of
fields but it doesn’t work on a Blackberry (even IF javascript is
enabled there). Is there a non-javascript way of preloading the fields
I have in my form below? Thanks, Janna
If your @email object has attributes called subject and so on,
text_field will take the value from there, if not the helpers take an
option (:value) or an argument to set what the initial value should be

Fred

Yes yes…here it is, I have it working and here is the syntax, in
case someone searches and arrives here in the future. Thansk
Frederick!

<%= text_field ‘email’, ‘recipient’, {:value => getAddy(params
[:id]), :readonly => ‘true’} %>

Janna B

On Jun 13, 10:15 am, Frederick C. [email protected]