1

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!

1 Answer 1

3

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.