"YT" <yt******@MAPSONfunkychickens.org> wrote:
I have a questionnaire that i'm building. Each step is a separate web
page with a form and a next button & back button, similar to a
wizard.
How often will users want to go back? A questionnaire is not a wizard.
Besides, what does "going back" mean here? Something else than using a
Back button?
Unless there are special reasons to provide some special "back"
functionality, I'm sure that the "back" button confuses more than helps.
What i would like to do is to make sure that all the information on
the form gets retained. i'm doing this via asp & session cookies.
Session cookies are not reliable. Besides, to make your site legal in the
EU, you would need to have a description of the use of cookies on it, and
this means extra work. (It's hard to describe the use in a manner that is
legally acceptable _and_ understandable _and_ does not make people
unnecessarily nervous.)
Using hidden fields is probably a better way. Make the script that
generates the first form generate and include a session id like
<input type="hidden" name="session" value="1389472576148">
and make further processing copy the field to new forms generated.
My issue is that if the user clicks on the Back button, i would like
the information to be stored as well.
You haven't specified what the "Back button" is, and does. And why should
the information be stored if the user wants to go _back_?
You could use different name attributes, or different value attributes,
or both, in the buttons, just as the FAQ says, in order to distinguish
between them in the form handler. But this doesn't work reliably on
current browsers if there are text input fields in the form, since
browsers may treat Enter in a text input field as a request to submit the
form _as if_ one of the buttons had been used - and browsers may differ
in interpreting which of the buttons should be simulated.
--
Yucca,
http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring:
http://www.cs.tut.fi/~jkorpela/www.html