Forum: Ruby many check_boxes

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
9aa1e92a0ebb17fdaad2fa39b4c52b8a?d=identicon&s=25 misiek (Guest)
on 2006-03-20 22:19
(Received via mailing list)
I need use check_box to search function.

sample..

I got like 10 items and each item has over 10 subitems ( or whatever )
Need to check some items use check_boxes and display all subitems
belongs to checked items.


<%= start_form_tag :action => 'find_ckecked'%>
     <table width = "100%" >
     <% @uitems.each do |item| %>
         <tr  bgcolor = "lightgray">
             <td>
             <%= check_box("item", "name" ) %>
             <%= item.name %>
             </td>
         </tr>
     <%= submit_tag "search" %>
<%= end_form_tag %>


I have no ideas how to do that please if some body did that before could
  give some clues ?!
0b561a629b87f0bbf71b45ee5a48febb?d=identicon&s=25 Dave Burt (Guest)
on 2006-03-21 05:03
(Received via mailing list)
misiek wrote:
> I need use check_box to search function.
> ...
> <%= start_form_tag :action => 'find_ckecked'%>
> ...

Hi,

This specifically Rails question is off-topic here. Try the Rails list:
http://lists.rubyonrails.org/mailman/listinfo/rails

You'll get better answers for Rails questions like this there.

In direct answer to your question, you probably want to toggle the
display
property of the children between "none" and "" (default). The
JavascriptHelper might be of use:
http://api.rubyonrails.com/classes/ActionView/Help...

Cheers,
Dave
This topic is locked and can not be replied to.