Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Christine Jacobus](https://uploads.teamtreehouse.com/production/profile-photos/496752/micro_R.jpg)
Christine Jacobus
Courses Plus Student 2,738 PointsCreate a dropdown using simpleform gem
Hi guys, I'm trying to create a dropdown with preset values and label but i'm not sure how to do this. My app is currently using the SimpleForms Gem.
Here is what i'm trying to achieve.
<select id="font-style" name="signature[font]" class="form-control">
<option value="Helvetica, Arial, sans-serif">Helvetica / Arial</option>
<option value="Georgia, Times, serif">Georgia / Times</option>
</select>
```
3 Answers
![Sean Perryman](https://uploads.teamtreehouse.com/production/profile-photos/53667/micro_V__8765.jpg)
Sean Perryman
13,810 PointsThough I am not a Ruby expert by any means, wouldn't you just use an f.input with the collections parameter?
<%= simple_form_for @i_dont_know_what_to_put_here do |f| %>
<%= f.input :age, collection: { "Helvetica, Arial, sans-serif", "Helvetica, Arial, sans-serif" } %>
<%= f.button :submit %>
<% end %>
![Sean Perryman](https://uploads.teamtreehouse.com/production/profile-photos/53667/micro_V__8765.jpg)
Sean Perryman
13,810 PointsCan you pass an array to the :label argument to compliment the collection argument?
<%= f.input :font, collection: ["Helvetica Arial, sans-serif", "Georgia, Times, serif"], label: ["Serif", "Sans-Serif"] %>
I think to figure out what data is getting passed you are going to have to echo out the contents of the post call. Again, new to RoR myself, but in PHP I would do this:
<?php
if (isset($_POST)) { echo $_POST; }
?>
Perhaps there is some equivalent in RoR?
![Christine Jacobus](https://uploads.teamtreehouse.com/production/profile-photos/496752/micro_R.jpg)
Christine Jacobus
Courses Plus Student 2,738 PointsDidn't Work the label is for the actual field label :-/
Christine Jacobus
Courses Plus Student 2,738 PointsChristine Jacobus
Courses Plus Student 2,738 PointsThanks this helped me get closer to what I needed.
<%= f.input :font, collection: ["Helvetica Arial, sans-serif", "Georgia, Times, serif"] %>
But I still don't know how to set a name and value, i'de like the dropdown to show Serif and San-serif but when saved to save the values to the DB.