# Related select form plugin problem

**URL:** <https://www.ruby-forum.com/t/related-select-form-plugin-problem/113207>\
**Category:** Rails\
**Created:** [August 28, 2007, 6:57pm UTC](https://www.ruby-forum.com/t/related-select-form-plugin-problem/113207 "2007-08-28T18:57:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![P.F.Pluto](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/85f322/32.png) [@P.F.Pluto](https://www.ruby-forum.com/u/P.F.Pluto)\
**Post date:** [August 28, 2007, 6:57pm UTC](https://www.ruby-forum.com/t/related-select-form-plugin-problem/113207/1 "2007-08-28T18:57:57Z")

</div>

I’m trying to use the dvisionfactory related select form plugin to  
display categories with dependent subcategories in select boxes in a  
form. I think I’m very close, but I can’t quite get it to work. This  
is my view:

\<%= collection\_select(:category, :id, @category, :id, :title) %\>

\<%= related\_collection\_select(:subcategory, :id, [:category, :id],  
@subcategory, :id, :title, :parent\_id) %\>

Which renders this in the HTML page source:

Accommodation and Food Services

Administrative and Support and Waste Management and Remediation Services Agriculture, Forestry, Fishing and Hunting \</

select\>

This page source looks OK to me, the categories and subcategories are  
right. The problem is that there is nothing in the subcategory select  
box on the screen, whether I select a value in the category box or  
not. I don’t have much javascript experience so this is driving me  
crazy.

Any help appreciated.
