Forum Moderators: open
as the name of the post suggests, i am wondering if anyone knows if this is possible, i am guessing not.
but just to ask.
can i post an entire form onto another page without:
1. hidden form fields
2. posting it all to the querystring
3. sticking it all in the session somewhere
anyone have any cuning ways to do this using none of the above..
tia
nathan
thanks for the reply. sorry the question was a little cryptic maybe.
imagine if you will a form on a page, in a multi page form process thingy.
i simply want to hold on to all the form data through the steps without having to make a whole load of hidden fields or stick the whole lot in the session.
i dont want to use the session because, well id just rather not, and although making lots of hidden form fields isnt a problem as such, i was just wondering if there was another way..
thats all ...
tia
nat
Regarding the hidden form elements, it is a lot of effort and prone to bugs on large forms but you could optimise this by looping over the entire form collection and then package the code into a re-usabale function.
Public Sub CopyForm()
dim f
%><form action="<%=Request.ServerVariables("SCRIPT_NAME")%>" method=post id=form2 name=form2><%
for each f in Request.Form
%><input type="hidden" name="<%=f%>" value="<%=Request(f)%>"><%
next
%></form><%
End Subif request("STAGE")="Confirm" then
call copyForm()
end if
yeah i had something similar to that, but , and it was just a wonder really, if there was another way to do this.
as you say, it seems rather carpet bomby to me to refill the page with the last page form. i do of course have nice little form element building functions so it is not a huge problem, just thought there may be a quick and cunning way to do it in 1 foul swoop.
i guess i was after something like..
nextPage Request.Form = LastPage Request.Form
type thing..btw i realise that what i have written above is nonesensical dream :)
thanks again as always
nat
The answer is no.
You need to store the data somewhere!
You either store it all in one place (the page requests) or you use a session identifier. Either way you are still storing the data.
There's no other way of doing it. The physics of this universe don't allow it!
There's many different ways to implement sessions (don't let Microsoft fool you in to thinking that the Session object is the only way)
It really would help if you would say what you are trying to acheive. That way, we might be able to come up with a solution.