Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8590777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T23:22:17+00:00 2026-06-11T23:22:17+00:00

In Rails is it possible to achieve an HTML output like this using button_to

  • 0

In Rails is it possible to achieve an HTML output like this using button_to?

<button type="submit" value="1" name="id">Type 1</button>
<button type="submit" value="2" name="id">Type 2</button>

What are the reasons for using button_to over manually entering the HTML in my form?

…

EDIT:

Perhaps I should rephrase this? Seems the better way would be to add some hidden fields to the button_to form. It doesn’t seem like I can do this.

So what is the correct Rails solution to pass extra hidden fields to a dynamic form generated via a button_to? Or should I just build a form manually?

e.g. I have:

button_to "Download", items_path(:release_id => release), :remote => true

and I want to pass an extra parameter in the form POST format => "download"

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T23:22:18+00:00Added an answer on June 11, 2026 at 11:22 pm

    Seems my answer was to use the form_tag helper

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Rails console, how to stop output of return value? Consider this session
Is it possible to use Cucumber outside Rails? I'd like to start using it
I am using Rails 3.2.1. Is it possible to use different views when using
I'm new to rails, so this might seem like a dumb question. I want
Is it possible in Rails 3.0 to render a partial where the name of
I am using Rails 2.3.5 and is wondering if it is possible to rewrite
I'm using rails 3.2.3 and am having trouble assigning a value in my HABTM
Rails make It possible to map resources that are logically children of other resources
Possible Duplicate: Rails 2.3-style plugins and deprecation warnings running task in Heroku I am
Possible Duplicate: Ruby On Rails 3 and Webrick issue $ rails server /Users/Vineeth/.rvm/gems/ruby-1.9.3-p194/gems/ruby-debug-base19-0.11.25/lib/ruby-debug-base.rb:1:in `require':

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.