How do you also pass label tag values in a form in Ruby on Rails?

I have a form that has label values that I would like to pass to my controller on the submit post. Right now the params from the post only includes values from input and radio_button tags. How do I also include the values in the label tags I have in my form?

This is a simplified view of how my code looks like:

  = form_for :user, :url => create_user_path do  |f|
    = f.label :name, "Name: #{@widgit.name}"
    = f.submit 

Thanks!

Answers


Use hidden fields; labels are just text so not sent.


Need Your Help

How to create a window in c?

linux user-interface

I want to create a window, for that I know I have to use gtk+ toolkit,

Suitable way to parse XML in Android

android xml parsing xmlpullparser

Can anyone advise me a suitable (and fast) ways to parse XML (especially RSS) file in Android? Please don't advise XmlPullParser because it's completelly unacceptable. It could blow up minds.