Forum: Ruby on Rails Form Field

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.
85e05b7260af81cbacfea7e7ed4f40fb?d=identicon&s=25 Guest (Guest)
on 2006-06-05 19:08
I'm trying to get the value of a form field (input type="text"
id="name">) from a controller via the params hash, but this isn't
working. I thought params[:name] would return this. The textbox is not
part of the model.

Does anyone know how to do this??

Thanks!
39b36b2be47228f8619d61ea7a607a25?d=identicon&s=25 Matthew Beale (mixonic)
on 2006-06-05 19:12
Guest wrote:
> I'm trying to get the value of a form field (input type="text"
> id="name">) from a controller via the params hash, but this isn't
> working. I thought params[:name] would return this. The textbox is not
> part of the model.
>

Whoops! use name= instead of id= for naming form elements.

--
Matthew Beale :: mixonic@synitech.com
Portfolio & Resume @ http://madhatted.com
This topic is locked and can not be replied to.