# Checkbox to dropdown list

**URL:** <https://www.ruby-forum.com/t/checkbox-to-dropdown-list/169686>\
**Category:** Rails\
**Created:** [June 7, 2009, 12:28am UTC](https://www.ruby-forum.com/t/checkbox-to-dropdown-list/169686 "2009-06-07T00:28:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fonziguy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/f05b48/32.png) [@fonziguy](https://www.ruby-forum.com/u/fonziguy)\
**Post date:** [June 7, 2009, 12:28am UTC](https://www.ruby-forum.com/t/checkbox-to-dropdown-list/169686/1 "2009-06-07T00:28:23Z")

</div>

Hello everybody

I’m new here. Looking for a bit of help.

I have a long list with radio buttons generated by the attached code. I  
need to change this from radio buttons to 2 drop down boxes. One for the  
Add-On name and one for the billing cycle. To see the page in action  
Click Here.

Hope somebody can give me some pointers.

Many Thanks

Lee

Here is the code:

[code]\<%= user\_menu %\>

## Add-ons

We offer some additional services to improve your web site or hosting experience. Please select any you'd like to order below.

\<% if no\_upsell? %\>\<% end %\> \<% i = 0 %\> \<% addon\_products.each do | product | %\>
#### \<%= product.name.html %\>

\<%= product.description %\>

\<% if product.linkable? %\>

Link to: \<%= product.link\_select(i, linkable\_domains, package\_linked\_domains) %\>

\<% end %\> \<% if product.link\_error==:no\_domains %\>

You have no domain names available to attach this to. Please order one if you wish to purchase this item.

\<% elsif product.link\_error==:no\_packages %\>

You have no packages available to attach this to. Please order one if you wish to purchase this item.

\<% elsif product.link\_error %\>

Purchasing this add-on is not currently possible. Please try again later.

\<% end %\>

disabled='disabled' \<% end %\>type='checkbox' name='add-product' value='\<%= product.specific\_type.html %\>:\<%= i %\>:base\_renewal\_period,quoted\_unit\_price,link\_to' /\>\<%= billing.currency\_symbol.html %\>\<%= billing.price(product.unit\_price, :use\_tax\_prefs) %\> \<% if product.base\_renewal\_period != 'never' %\> every \<%= product.unit\_period.to\_s\_short.html %\> \<% end %\> \<% if product.setup\_fee != 0 %\> plus a one off fee of \<%= billing.currency\_symbol.html %\>\<%= sprintf("%.2f", if billing.include\_tax? then billing.price(product.setup\_fee) else product.setup\_fee end) %\> \<% end %\> \*

\<% i = i + 1 %\> \<% end %\> \<% unless basket.nil? or basket.empty? or no\_upsell? %\>

No thank you, please continue with my order ....

\<% end %\> \<% if not billing.tax\_applies? %\> \<% elsif billing.include\_tax? %\> 

\* Includes \<%= billing.tax\_name %\>

\<% else %\> 

\* Excluding \<%= billing.tax\_name %\>

\<% end %\>
[/code]
