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 8412835
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:46:38+00:00 2026-06-10T00:46:38+00:00

I have a software table, which has 4 fields; id, vendor, title and edition.

  • 0

I have a software table, which has 4 fields; id, vendor, title and edition. I need a drop down box in my licenses form which will show every record like this: vendor – title – edition, but then only save the id of the chosen record to the database. I’m currently using a text box where the user can just enter the id of the software which will be saved to the database. here is my current form:

<%= form_for(@licenses) do |f| %>

<div class="well">
<%= f.label 'Software' %><br />
<%= f.text_field :software_id %>


<%= f.label 'Quantity' %><br />
<%= f.text_field :amount %>

<%= f.submit 'add'%>
</div>

<% end %>

I need to change the software text field into a drop down box, sorry if this is vague, i’ve not had anything to do with drop down boxes before.

  • 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-10T00:46:39+00:00Added an answer on June 10, 2026 at 12:46 am

    Checkout collection_select for populating drop box

    create a method in softwarer model like

    def title_edition
    "#{self.vendor.name}- #{self.title} - #{edition}"
    end
    @softwares = Software.all #In controller
    

    and in view

    <%= f.collection_select :software_id ,@softwares,:id,:title_edition %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table that describes which software versions were installed on a machine
Say I have a Companies table which has a many-many relationship with an Employees
So we have a piece of software which has a poorly written SQL statement
I have an HTML form which has a field with an ID of 'soln_c_links'
i have a leads table that has a field named referrer..which has data like
Let's say I have a MySQL table that is something like this: software table:
We have this software that has a webservices component. Now, the administrator of this
I have a table used by one piece of 3rd party software (say user_fields)
I have 4 tables which holds information about our Licenses. We have our own
I have a MySQL table which contains a list of all possible products a

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.