SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot Dionysis's Avatar
    Join Date
    Jan 2004
    Location
    Socal
    Posts
    168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Many to many relationships

    Ahoy

    I'm setting up a many to many relationship and wondering what is the best way to display this in the view?

    currently using checkboxes like this -

    <fieldset>
    <legend>Select Vital Stats</legend>
    <% for vital_stat in @vital_stats %>
    <%= form_bit_checkbox('vital_stat', vital_stat.id, vital_stat.title, '', '', {'checked' => 'checked'}) %>
    <% end %>
    <div class="cleaner"></div>
    </fieldset>


    Still need to figure out a way to check the box , but is there a better way to do many to many than checkboxes?

  2. #2
    SitePoint Guru Majglow's Avatar
    Join Date
    Aug 1999
    Location
    B-Town
    Posts
    645
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It would depend on the actual content. Checkboxes work... just writing a list into a textbox (like tagging), drag / drop, etc...
    Ohai!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •