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 ?

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.

I did see this mentined in some article and its frustrating not to
find any pointers.

thanks for trying to help =)

what about form_remote_for or form_remote_tag?

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

link_to_function('edit', visual_effect(:toggle_appear,

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: <%= %><br />
  Field 2: <%= @model.description %>

<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 %>

I usually put something like the above into a partial, then use RJS to
reload that partial after the remote save.

Hope this helps.


Thanks Nathan!

That was in line with what I was looking for :=)


Can you explaine me all process that means which files is include and
how to apply it because of i want it in cake php and prototype

Firstly are you familiar with Rails? If not then first work right
through a good tutorial such as (which is free to
use online). That should show you the basics of rails.