idealguru-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Jun-01 23:57 UTC
In place editing for a "group of fields"
I remember seeing such a technique in a blog/article/book but am unable to find it. It essentially used a hidden div which contained the form which was visible only during editing. any pointers ? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
idealguru-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:> I remember seeing such a technique in a blog/article/book but am > unable to find it. > > It essentially used a hidden div which contained the form which was > visible only during editing. > > any pointers ?Are you looking for something like this?: http://24ways.org/2005/edit-in-place-with-ajax I found script.aculo.us has this built in (which is in Ruby on Rails): http://wiki.script.aculo.us/scriptaculous/show/Ajax.InPlaceEditor I also found this for prototype (also built in to Ruby on Rails): http://joseph.randomnetworks.com/archives/2006/04/18/ajax-edit-in-place-with-prototype/ Hopefully, one of these will help. Mike -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
idealguru-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Jun-02 15:07 UTC
Re: In place editing for a "group of fields"
Thanks Mike ... all of those resources talk about in-place editing for just one field at a time. What I am looking for is a dynamic form that follows the same principle but for a group of fields at a time. So instead of having to save each individual field, the user can edit multiple fields and hit save just once. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
idealguru-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:> Thanks Mike ... all of those resources talk about in-place editing for > just one field at a time. > > What I am looking for is a dynamic form that follows the same > principle but for a group of fields at a time. So instead of having to > save each individual field, the user can edit multiple fields and hit > save just once.Unfortunately, I don''t see anything that has that. I did find someone who asked about the same functionality in November 2006, but the reply was that the edit in place script would have to be re-worked. Sorry I couldn''t help. Mike -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
idealguru-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Jun-02 23:57 UTC
Re: In place editing for a "group of fields"
I did see this mentined in some article and its frustrating not to find any pointers. thanks for trying to help =) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
what about form_remote_for or form_remote_tag? http://api.rubyonrails.com/classes/ActionView/Helpers/PrototypeHelper.html#M000531 http://api.rubyonrails.com/classes/ActionView/Helpers/PrototypeHelper.html#M000529 On 6/2/07, idealguru-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <ubguru-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I did see this mentined in some article and its frustrating not to > find any pointers. > > thanks for trying to help =) > > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
What I do in this case is create the form_remote_for inside a hidden div (style="display:none") then toggle that hidden div with something like: link_to_function(''edit'', visual_effect(:toggle_appear, ''the_hidden_form_div'')) If you want to be able to click on multiple fields and edit them all, you could do something like this: <div id="fields" onclick="$(''fields'').hide();$(''edit'').show()"> Field 1: <%= @model.name %><br /> Field 2: <%= @model.description %> </div> <div id="edit" style="display:none"> <% form_remote_for :model..... do |f| %> <%= f.text_field, :name %><br /> <%= f.text_area, :description %><br /> <%= submit_tag ''Save'' %> <%= link_to_function ''Cancel'', "$(''edit'').hide();$ (''fields'').show()" $> <% end %> </div> I usually put something like the above into a partial, then use RJS to reload that partial after the remote save. Hope this helps. -=nathan On Jun 1, 6:57 pm, "idealg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <ubg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I remember seeing such a technique in a blog/article/book but am > unable to find it. > > It essentially used a hidden div which contained the form which was > visible only during editing. > > any pointers ?--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
idealguru-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Jun-06 06:55 UTC
Re: In place editing for a "group of fields"
Thanks Nathan! That was in line with what I was looking for :=) On Jun 3, 7:40 am, Nathan Amick <thoughtobj...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> What I do in this case is create the form_remote_for inside a hidden > div (style="display:none") then toggle that hidden div with something > like: > > link_to_function(''edit'', visual_effect(:toggle_appear, > ''the_hidden_form_div'')) > > If you want to be able to click on multiple fields and edit them all, > you could do something like this: > > <div id="fields" onclick="$(''fields'').hide();$(''edit'').show()"> > Field 1: <%= @model.name %><br /> > Field 2: <%= @model.description %> > </div> > > <div id="edit" style="display:none"> > <% form_remote_for :model..... do |f| %> > <%= f.text_field, :name %><br /> > <%= f.text_area, :description %><br /> > <%= submit_tag ''Save'' %> > <%= link_to_function ''Cancel'', "$(''edit'').hide();$ > (''fields'').show()" $> > <% end %> > </div> > > I usually put something like the above into a partial, then use RJS to > reload that partial after the remote save. > > Hope this helps. > > -=nathan > > On Jun 1, 6:57 pm, "idealg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <ubg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I remember seeing such a technique in a blog/article/book but am > > unable to find it. > > > It essentially used a hidden div which contained the form which was > > visible only during editing. > > > any pointers ?--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---