# Basing Drop Down from Check Box

**URL:** <https://www.ruby-forum.com/t/basing-drop-down-from-check-box/170469>\
**Category:** Rails\
**Created:** [June 17, 2009, 10:54pm UTC](https://www.ruby-forum.com/t/basing-drop-down-from-check-box/170469 "2009-06-17T22:54:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rachel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/46a35a/32.png) [@rachel](https://www.ruby-forum.com/u/rachel)\
**Post date:** [June 17, 2009, 10:54pm UTC](https://www.ruby-forum.com/t/basing-drop-down-from-check-box/170469/1 "2009-06-17T22:54:09Z")

</div>

Hello All,

I am very new to Web D. (in general) and Ruby on Rails and  
have been stumped on this for awhile.

In my view I have a check box of which I need to grab a primary key  
value when checked.

The primary key value will then need to be used to generate and  
populate a corresponding drop down list.

Currently the data generated to view is similar to …

Telephone (primary key of 1) [check box] … web user clicks check box  
then I need to display corresponding database data based on the  
primary key

Internet (primary key of 2) [check box] … same concept for  
Telephone using Internet PK

Television (primary key of 3) [check box] … same concept for  
Telephone using Television PK

Can anyone please help me?

Rachel

---

<div class="post-metadata">

**Author:** ![rachel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/46a35a/32.png) [@rachel](https://www.ruby-forum.com/u/rachel)\
**Post date:** [June 18, 2009, 12:21am UTC](https://www.ruby-forum.com/t/basing-drop-down-from-check-box/170469/2 "2009-06-18T00:21:59Z")

</div>

Don’t use checkboxes… Use a link\_to\_remote…

If you need to have a checkbox you can allways just use an image of a  
checkbox. or a button\_to…

---

<div class="post-metadata">

**Author:** ![rachel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/46a35a/32.png) [@rachel](https://www.ruby-forum.com/u/rachel)\
**Post date:** [June 18, 2009, 1:54am UTC](https://www.ruby-forum.com/t/basing-drop-down-from-check-box/170469/3 "2009-06-18T01:54:59Z")

</div>

I will research this link\_to\_remote you mention and let you know how it  
goes. Thank you so much for the reply… heimdull

Thank you,  
Rachel S Nichol  
W: (843) 686-1223  
F: (843) 341-0980

Hargray’s mission: To envision and deliver customer delight
