Hi All,

New to the group, and new to learning rails.

I'm having some trouble, i've done a few tutorials on creating some
small apps with rails and am now starting to play around myself.

I've been trying to create a simple form which when a user enters any
data that data is displayed as a preview elsewhere on the page
instantly, just like when creating an advert with Google Adwords, the
preview is shown.

I've been using form_remote_for and observe_form but I don't seem to
be having much luck at all. I am unsure how to use the controller to
get the form fields and pass them back to a partial to be rendered?

Here is my form:

<% form_remote_for @advert do |a| %>
<label>Title:</label> <%= a.text_field :title %>
<br />
<label>First Line:</label> <%= a.text_field :first_line %>
<br />
<label>Second Line:</label> <%= a.text_field :second_line %>
<br />
<label>Visible URL:</label> <%= a.text_field :visible_url %>
<br />
<label>Destination URL:</label> <%= a.text_field :destination_url %>
<%= submit_tag 'Submit' %>
<% end %>

Any help would be great?

Cheers,

Phil

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to