Hi,
I have a form with two inputs, user and password. How do I access these two fields after a user fills them out and presses on the submit button?
I want to pass these two values to an action, add_user. How do I do this?
I have <% form_remote_tag :url => { :action => :add_user } do %> <%= submit_tag "Add user" %> <% end %>
A form submits its input elements. A form's input elements are the one it contains.
:add_user(a, b) doesn't seem to work
in the controller: def add_user(a, b)
controller actions never take any arguments. The params hash contains the passed parameters. I reckon you'd safe yourself some time by sitting down with a decent book/tutorial.
Fred