I have a website with a single template page (eg. template.html) and on this page I have a two page form. So basically the "do" action on the first page is "add_form" then on the second page it is "add_record". I separate the two pages (even though it is the same HTML template) with an IF statement so that if the second page sees the value from the first page it will display the second half of the block. This works well for multiple page forms and it allows you to do conditional forms depending on previous input entries (without a bunch of DHTML and javascript).
<%if page1field1%>
Second set of form fields.
<%else%>
First set of form fields.
<%endif%>
Here is my question: Is there a global variable that I can create that will automatically create the "hidden" form elements from the first part of the page? Right now I am manually doing "hard coded" hidden forms like this on the second page:
On each page I do a HIDDEN tag with the previous form's fields on it. Can somebody help me generate a Global Template that will automatically create the previous pages FORM fields (as hidden fields) rather than me hard coding each page?
P.S. I can already see that there are some fields, like "do", that we don't want brought over to the second page, because they will change.
Code:
<%if page1field1%>
Second set of form fields.
<%else%>
First set of form fields.
<%endif%>
Here is my question: Is there a global variable that I can create that will automatically create the "hidden" form elements from the first part of the page? Right now I am manually doing "hard coded" hidden forms like this on the second page:
Code:
<input type="hidden" name="page1field1" value="<%page1field1%>"> On each page I do a HIDDEN tag with the previous form's fields on it. Can somebody help me generate a Global Template that will automatically create the previous pages FORM fields (as hidden fields) rather than me hard coding each page?
P.S. I can already see that there are some fields, like "do", that we don't want brought over to the second page, because they will change.