I have a form full of select boxes. What is the *best* way to take a querystring of previously submitted form values, and re-select the previously selected values. I know how to use Prototype to get a hash of values: location.search.toQueryParams(); and I know how to write a function that takes the id of the select box, the previously selected value, and does what it needs to do. However, it seems to me that there must be something already out there. What''s the elegant way to do this? Thanks for any recommendations! Mark --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Brian Williams
2007-Nov-02 02:33 UTC
Re: Elegantly re-select previously selected options in a form
i would turn the multiselect boxes and turn them into a scrolling div of checkboxes. it''s easier for the user and in this case would make it real easy to accomplish what you want to do On Nov 1, 2007 8:52 PM, mveerman <markveerman-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I have a form full of select boxes. What is the *best* way to take a > querystring of previously submitted form values, and re-select the > previously selected values. I know how to use Prototype to get a hash > of values: location.search.toQueryParams(); and I know how to write a > function that takes the id of the select box, the previously selected > value, and does what it needs to do. However, it seems to me that > there must be something already out there. What''s the elegant way to > do this? > > Thanks for any recommendations! > Mark > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---