Storing fied contents in a session variable before link_to

Hello,
in my rails application I have the following requierement:

I want to store the content of all editable fields (form tag) of a page
in a session variable when the “link_to” action is selected.
(Submit would be easy, for details & background please see below).
Thanks a lot
Christian

I may miss here something, but this is my problem (I tried hard to make
it clear - just let me know if you have questions):

Situation:

  1. page 1: will save the main object (form tag), with a link (link_to)
    to page 2
  2. page 2: enter additional information relevant for the main object
  3. After the information in page 2 is added user will submit (infos
    stored in a session variable) and be redirected to page 1
  4. On submit for page 1 ojbect will be saved wiht page 1 fields in
    combination with infos from the session variable with infos from page 2.

Now come the problem scenario:

  1. User will update some of the data in page 1 (not submit) and then
    select link to page 2.
  2. After action on page 2 is finished, user will submit page 2 and page
    1 is displayed in the browser.

Problem:
When page 1 is displayed again, it should show all user changes done
before selecting “link_to” to page 2.
It will not help just to display page 1 again, as all changes done
before by the user will be lost.

Ideas:
In order to do, I have to extract all pages data from page 1) in a
second session object before linking to page 2

Then after submitting info from page 2 I can populate page 1 with all
info stored in the session and therefore keep the user infos.

Remark in addition:
I read, that there is some java script that can collect all variables of
a page.
Does anybody know this ?
Thanks
Christian

Christian Neuhaus wrote:

Hello,
in my rails application I have the following requierement:

I want to store the content of all editable fields (form tag) of a page
in a session variable when the “link_to” action is selected.
(Submit would be easy, for details & background please see below).
Thanks a lot
Christian

I may miss here something, but this is my problem (I tried hard to make
it clear - just let me know if you have questions):

Situation:

  1. page 1: will save the main object (form tag), with a link (link_to)
    to page 2
  2. page 2: enter additional information relevant for the main object
  3. After the information in page 2 is added user will submit (infos
    stored in a session variable) and be redirected to page 1
  4. On submit for page 1 ojbect will be saved wiht page 1 fields in
    combination with infos from the session variable with infos from page 2.

Now come the problem scenario:

  1. User will update some of the data in page 1 (not submit) and then
    select link to page 2.
  2. After action on page 2 is finished, user will submit page 2 and page
    1 is displayed in the browser.

Problem:
When page 1 is displayed again, it should show all user changes done
before selecting “link_to” to page 2.
It will not help just to display page 1 again, as all changes done
before by the user will be lost.

Ideas:
In order to do, I have to extract all pages data from page 1) in a
second session object before linking to page 2

Then after submitting info from page 2 I can populate page 1 with all
info stored in the session and therefore keep the user infos.