Forum: Ruby on Rails Multiply forms?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
28be3be213eeed3f66e0a20f1e20c7ac?d=identicon&s=25 Remco Swoany (zwaan123)
on 2009-04-16 14:46
Hi,

On my homepage i want a form with the element drop-down-box. When the
visitor select one of the values from the drop-down-box and click on
submit, the visitor go's to the details-page where the value from the
drop-down-box is filled in and the visitor are suggested the complete
the form.

I am a newbie...so can someone put me in the right direction

Thanks..Remco
648a71a35ce6e4a1c5cd63451a2a20df?d=identicon&s=25 Gavin (Guest)
on 2009-04-16 14:54
(Received via mailing list)
in the view:

<% form_tag :action => 'redirect' do %>
<%= select_tag :target, ['option1', 'option2, 'option3' ] %>
<%= submit_tag "go" %>

in the controller:

def redirect
  redirect_to :action => params[:target], :controller =>
'controller_name'
end

that help at all?


On Apr 16, 1:46 pm, Remco Swoany <rails-mailing-l...@andreas-s.net>
This topic is locked and can not be replied to.