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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T15:19:11+00:00 2026-06-10T15:19:11+00:00

How would one set :id => myvalue for a simpleform collection input field? and

  • 0

How would one set:id => “myvalue” for a simpleform collection input field?
and or on a sidenote, im also trying to set the ID of age_from like id => “age_from” cannot figure out how to do both, seems very lacking docs on these.

Tried all possible combinations I could comeup with:

= f.input_field :age_to,
  :label => "Age from",
  :collection => 18..60,
  :select => 19 <------- set this to '19' for this collection?
  :style => "width: 50px !important",
  :id => "myid" <------- how to set id for this collection?
  • 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-10T15:19:13+00:00Added an answer on June 10, 2026 at 3:19 pm
    f.input_field :age_to, :label => "Age from", :collection => 18..60, 
    :selected => 19, :style => "width: 50px !important", :input_html => { :id => "myid" }
    

    Hope it works to set id and show selected value!!!

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

Sidebar

Related Questions

I'm trying to figure out how one would set up a database and/or model
How would one set/unset enum value for something like the following. Using gcc, I
How would one set a minimum interval for a launchd.plist script with a WatchPath
How would one set up an email alert to be sent, if there are
I have a master (linux) and a windows slave set up, and would like
Why would one set the Style property of a control to a template binding
I was wondering how one would set up qt creator 2.1.0 to work with
In maven 2.x, how would one set a plugin's property on the command line
How would one loop thru a set of nodes, where the node name has
I'm trying to set one of two Binding s on a ListBox 's ItemsSource

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.