Hi all, I'm having a hard time trying to find a good tutorial on how to generate a field (with ajax) from a dropdown selection.
For example: I have an app where you can select up to two tickets per person. Only if the user selects '2' from the dropdown menu should a field pop up/generate below the dropdown and ask the user for the name of the second person. So far I have the following code: <h3>Number of Tickets?</h3> <%= select :tickets, :quantity, { "Select quantity" => "", "1" => "1", "2" => "2"} %> <h3>Name of guest?</h3> <%= f.text_field :guest_name %> So in my case, only if quantity is selected as two should guest_name appear (without refreshing the page). Thanks in advance and THANK YOU FOR YOUR TIME!! Best regards, Tony -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---