Quantcast
Viewing all articles
Browse latest Browse all 21760

Re: How to you save form data on a form submitted to itself?

This is something I inherited. The original programmer used cflocation to bring the user back to main page. When I was requested to change it . I did this:

 

On page 1 at the top of the page. I have this.

 

<cfapplication name="qsErrorVals" sessionmanagement="yes">

 

<CFinclude template="/include/checkidtop.cfm">  ---css infromation

 

<CFPARAM name="startDate" default="">

<CFPARAM name="EndDate" default="">

<CFPARAM name="SearchFor" default="">

<CFPARAM name="SearchIn" default="">

 

<cflock scope="session" type="readonly" timeout="200">

    <cfset session.startDate = startDate>

    <cfset session.EndDate = EndDate>

    <cfset session.SearchFor= SearchFor>

    <cfset session.SearchIn= SearchIn>

</cflock>

 

<cfdump var="#session#">

 

Then it gets sent back to itself to perform a search. When the user searches the session state is maintained and I can see the data fine. They click on a row to edit and brings them off the current page to an edit page. Session state is still maintained. Once the user clicks on I'm done it brings them back to the main form page via cflocation where session state is lost. I have also added hidden fields to save the form data and again it it fine until the user clicks on I'm done and the hidden form data is erased.

 

Does that help?

 

Laura


Viewing all articles
Browse latest Browse all 21760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>