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

  • Home
  • SEARCH
  • 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 8738457
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:44:06+00:00 2026-06-13T10:44:06+00:00

I have one select_tag and multiple button_to buttons on the same page. I’m looking

  • 0

I have one select_tag and multiple button_to buttons on the same page. I’m looking to use the parameters from the select_tag for several of the buttons, is there a non-form way to do this?

The reason I don’t want to use a form is two fold:
1. the number of buttons is dynamic
2. the positioning of the buttons do not follow the form structure (object at the top and submit at the bottom)

-here is one of the create methods that are linked to one of the buttons

def create
  params[:options].each do |x|
    @connector = Connector.find_or_create_by_options_id_and_follow_id(x.id, current_user.follow(@product).id)
    @connector.save
  end
end

I checked and this params[:options] is always nil no matter what is selected by me when I test

<%= select_tag :options, options_for_select(@current_user_options.map {|p| [p.name, p.id] }), {:multiple => true} %>
  • 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-13T10:44:07+00:00Added an answer on June 13, 2026 at 10:44 am

    button_to method actually creates a form which has a submit button, with the form action being the url which you had mentioned in button_to. So when you hit the submit button, obviously the options param will be nil, since the button_to form has no data in it

    You can use a form itself, and form does not mandate, having an object at the top and submit button below. Submit button just submits the form irrespective of its position in the form

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

Sidebar

Related Questions

I have the same request executed multiple times with different ID: SELECT n.id FROM
I have two jQuery autocomplete textboxes on a mvc web page. One that returns
I have a code that removes an option element from a select multiple( <select
I have multiple instances of a fragment that are inflated from an xml file,
I have one scenario where I need to select all files having aliencoders.numeric-digits like
I have one demo application to check select for update query public class Test
i have one form which have some input box and some select box. i
I have written a simple CRUD form which has one select list. However the
i have a time dropdown that shows hour in one select, minutes in another
Lets say that we have a query like this one: SELECT *, (CUSTOM_EXPRESSION) as

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.