Can you please explain more about it "I need to know the name of the node the user comes from. Is it possible to get the previous node (the node which generated the page which called the current page) and how ?"
Let's take an example : I am browsing my site. I'm currently viewing the page of the node named "A". Then, I click "submit" and I am redirected towards a form. The form has to know that I am coming from the "A" node, so it can auto-fill its input with "A"
In the form template, how can I do to get the previous node (in the example above, the previous node is the "A" node) ?.
You can create a cookie with this information when user is on node named "A" and then set the form input value reading and assigning cookie value to its value getting input element by id.
You can create a template operator that sets and get a session value using ezhttptool: lib/ezutils/classes/ezhttptool.php
But it isn't as straightforward as using cookies.
Maybe {ezhttp( 'LastAccessesURI', 'session' )} could work, but you will need to fetch the node of the last access URI or something else, don't know, never tried.
Another way could be with $view_parameters, so you link your node b url as path_to_nodeB/(title)/NodeA Tiltle
Then in template you access node A name with {$view_parameters.title}