Index: Classes/Finisher/Tx_Formhandler_Finisher_SubmittedOK.php
===================================================================
--- Classes/Finisher/Tx_Formhandler_Finisher_SubmittedOK.php	(revision 39812)
+++ Classes/Finisher/Tx_Formhandler_Finisher_SubmittedOK.php	(working copy)
@@ -46,12 +46,6 @@
 		
 		//set session value to prevent another validation or finisher circle. Formhandler will call only this Finisher if the user reloads the page.
 		Tx_Formhandler_Session::set('submittedOK', TRUE);
-		
-		$action = $this->gp['action'];
-		if($action) {
-			
-			$this->processAction($action);
-		}
 
 		//read template file
 		$this->templateFile = Tx_Formhandler_Globals::$templateCode;
@@ -72,25 +66,6 @@
 		$view->setComponentSettings($this->settings);
 		return $view->render($this->gp, array());
 	}
-	
-	protected function processAction($action) {
-		if(is_array($this->settings['actions.'])) {
-			foreach($this->settings['actions.'] as $key=>$options) {
-				if(strpos($key, '.') !== FALSE) {
-					$currentAction = str_replace('.', '', $key);
-					if($currentAction === $action) {
-						$class = $options['class'];
-						if($class) {
-							$class = Tx_Formhandler_StaticFuncs::prepareClassName($class);
-							$object = $this->componentManager->getComponent($class);
-							$object->init($this->gp, $options['config.']);
-							$object->process();
-						}
-					}
-				}
-			}
-		}
-	}
 
 }
 ?>
Index: Classes/Controller/Tx_Formhandler_Controller_Form.php
===================================================================
--- Classes/Controller/Tx_Formhandler_Controller_Form.php	(revision 39865)
+++ Classes/Controller/Tx_Formhandler_Controller_Form.php	(working copy)
@@ -183,24 +183,60 @@
 		
 		$this->processFileRemoval();
 
-		//not submitted
-		if(!$this->submitted) {
-			
+		$action = t3lib_div::_GP('action');
+		if(Tx_Formhandler_Globals::$formValuesPrefix) {
+			$temp = t3lib_div::_GP(Tx_Formhandler_Globals::$formValuesPrefix);
+			$action = $temp['action'];
+		}
+		if($action) {
+			$this->processAction($action);
+		}
+		
+		if($this->submittedOK) {
+			return $this->processSubmittedOK();
+		} elseif(!$this->submitted) {
 			return $this->processNotSubmitted();
-			
-			//submitted
 		} else {
-			if($this->submittedOK) {
-				
-				return $this->processSubmittedOK();
+			return $this->processSubmitted();
+		}
 
-			} else {
-		
-				return $this->processSubmitted();
-				
+	}
+	
+	protected function processAction($action) {
+		$gp = $_GET;
+		if(Tx_Formhandler_Globals::$formValuesPrefix) {
+			$gp = t3lib_div::_GP(Tx_Formhandler_Globals::$formValuesPrefix);
+		}
+		if(is_array($this->settings['finishers.'])) {
+			$finisherConf = array();
+			foreach($this->settings['finishers.'] as $key => $config) {
+				if(strpos($key, '.') !== FALSE) {
+					$className = Tx_Formhandler_StaticFuncs::prepareClassName($config['class']);
+					if($className === 'Tx_Formhandler_Finisher_SubmittedOK' && is_array($config['config.']['actions.'])) {
+						$finisherConf = $config['config.']['actions.'];
+					}
+				}
+			}
+			if($finisherConf[$action . '.']) {
+				$tstamp = $GLOBALS['TYPO3_DB']->fullQuoteStr($gp['tstamp']);
+				$hash = $GLOBALS['TYPO3_DB']->fullQuoteStr($gp['hash']);
+				if($tstamp && $hash) {
+					$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('params', 'tx_formhandler_log', 'tstamp=' . $tstamp . ' AND key_hash=' . $hash);
+					if($res && $GLOBALS['TYPO3_DB']->sql_num_rows($res) === 1) {
+						$row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
+						$GLOBALS['TYPO3_DB']->sql_free_result($res);
+						$params = unserialize($row['params']);
+						$class = $finisherConf[$action . '.']['class'];
+						if($class) {
+							$class = Tx_Formhandler_StaticFuncs::prepareClassName($class);
+							$object = $this->componentManager->getComponent($class);
+							$object->init($params, $finisherConf[$action . '.']['config.']);
+							$object->process();
+						}
+					}
+				}
 			}
 		}
-
 	}
 	
 	protected function processSubmitted() {
@@ -445,6 +481,22 @@
 	}
 	
 	protected function processSubmittedOK() {
+		
+		$gp = $_GET;
+		if(Tx_Formhandler_Globals::$formValuesPrefix) {
+			$gp = t3lib_div::_GP(Tx_Formhandler_Globals::$formValuesPrefix);
+		}
+		$tstamp = $GLOBALS['TYPO3_DB']->fullQuoteStr($gp['tstamp']);
+		$hash = $GLOBALS['TYPO3_DB']->fullQuoteStr($gp['hash']);
+		if($tstamp && $hash) {
+			$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('params', 'tx_formhandler_log', 'tstamp=' . $tstamp . ' AND key_hash=' . $hash);
+			if($res && $GLOBALS['TYPO3_DB']->sql_num_rows($res) === 1) {
+				$row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
+				$GLOBALS['TYPO3_DB']->sql_free_result($res);
+				$this->gp = unserialize($row['params']);
+			}
+		}
+		
 		$this->loadSettingsForStep($this->currentStep);
 		$this->parseConditions();
 		$this->view->setLangFiles($this->langFiles);
@@ -781,7 +833,11 @@
 		Tx_Formhandler_Session::set('startblock', NULL);
 		Tx_Formhandler_Session::set('endblock', NULL);
 		Tx_Formhandler_Session::set('currentStep', 1);
+		Tx_Formhandler_Session::set('inserted_uid', NULL);
+		Tx_Formhandler_Session::set('inserted_tstamp', NULL);
+		Tx_Formhandler_Session::set('key_hash', NULL);
 		$this->gp = array();
+		$this->currentStep = 1;
 		Tx_Formhandler_Globals::$gp = $this->gp;
 		Tx_Formhandler_StaticFuncs::debugMessage('cleared_session');
 	}
@@ -1042,6 +1098,10 @@
 		$this->submittedOK = Tx_Formhandler_Session::get('submittedOK');
 		
 		if(!$this->submittedOK) {
+			$this->submittedOK = $this->gp['submitted_ok'];
+		}
+		
+		if(!$this->submittedOK) {
 			$this->submittedOK = t3lib_div::_GP('submitted_ok');
 		}
 		
Index: Classes/Logger/Tx_Formhandler_Logger_DB.php
===================================================================
--- Classes/Logger/Tx_Formhandler_Logger_DB.php	(revision 39812)
+++ Classes/Logger/Tx_Formhandler_Logger_DB.php	(working copy)
@@ -56,8 +56,9 @@
 		//query the database
 		$res = $GLOBALS['TYPO3_DB']->exec_INSERTquery($table, $fields);
 		$insertedUID = $GLOBALS['TYPO3_DB']->sql_insert_id();
-		$lastId = Tx_Formhandler_Session::set('inserted_uid', $insertedUID);
-
+		Tx_Formhandler_Session::set('inserted_uid', $insertedUID);
+		Tx_Formhandler_Session::set('inserted_tstamp', $fields['tstamp']);
+		Tx_Formhandler_Session::set('key_hash', $hash);
 		if(!$this->settings['nodebug']) {
 			Tx_Formhandler_StaticFuncs::debugMessage('logging', $table, implode(',', $fields));
 			if(strlen($GLOBALS['TYPO3_DB']->sql_error()) > 0) {
Index: Classes/Generator/FE/Tx_Formhandler_Generator_PdfGenerator.php
===================================================================
--- Classes/Generator/FE/Tx_Formhandler_Generator_PdfGenerator.php	(revision 39812)
+++ Classes/Generator/FE/Tx_Formhandler_Generator_PdfGenerator.php	(working copy)
@@ -14,29 +14,33 @@
 	
 	
 	public function getLink($linkGP) {
-		$params = array();
-
-		$url = Tx_Formhandler_StaticFuncs::getHostname() . $this->cObj->getTypolink_URL($GLOBALS['TSFE']->id, $linkGP);
 
-        $target = '_blank';
-        if($this->settings['target']) {
-            $target = $this->settings['target'];
-        }
+		$text = $this->getLinkText();
+		
+		$target = '_blank';
+		if($this->settings['target']) {
+			$target = $this->settings['target'];
+		}
 
-        $type = 123;
-        if($this->settings['type']) {
-            $type = $this->settings['type'];
-        }
+		$type = 123;
+		if($this->settings['type']) {
+			$type = $this->settings['type'];
+		}
 
 		$params = array(
 			'type' => $type,
-			'no_cache' => 1,
 			'submitted_ok' => 1
 		);
-
-        $params = array_merge($params, $linkGP);
+		
+		if($prefix) {
+			$params[$prefix]['tstamp'] = Tx_Formhandler_Session::get('inserted_tstamp');
+			$params[$prefix]['hash'] = Tx_Formhandler_Session::get('key_hash');
+		} else {
+			$params['tstamp'] = Tx_Formhandler_Session::get('inserted_tstamp');
+			$params['hash'] = Tx_Formhandler_Session::get('key_hash');
+		}
 
-		return $this->cObj->getTypolink('PDF', $GLOBALS['TSFE']->id, $params, $target);
+		return $this->cObj->getTypolink($text, $GLOBALS['TSFE']->id, $params, $target);
 	}
 }
 
Index: Classes/Generator/FE/Tx_Formhandler_Generator_TcPdf.php
===================================================================
--- Classes/Generator/FE/Tx_Formhandler_Generator_TcPdf.php	(revision 39812)
+++ Classes/Generator/FE/Tx_Formhandler_Generator_TcPdf.php	(working copy)
@@ -64,9 +64,10 @@
 			}
 			$downloadpath = str_replace(t3lib_div::getIndpEnv('TYPO3_DOCUMENT_ROOT'), '', $downloadpath);
 			header('Location: ' . $downloadpath);
+			exit;
 		} else {
-			$this->pdf->Output('formhandler.pdf','I');
-			
+			$this->pdf->Output('formhandler.pdf','D');
+			exit;
 		}
 	}
 	
@@ -74,25 +75,25 @@
 		$linkGP = array();
 		$prefix = Tx_Formhandler_Globals::$formValuesPrefix;
 		
+		$text = $this->getLinkText();
+		
 		$target = '_blank';
-        if($this->settings['target']) {
-            $target = $this->settings['target'];
-        }
-        
+		if($this->settings['target']) {
+			$target = $this->settings['target'];
+		}
+
+		$linkGP = array();
+		$prefix = Tx_Formhandler_Globals::$formValuesPrefix;
 		if($prefix) {
 			$linkGP[$prefix]['action'] = 'pdf';
-			$linkGP[$prefix]['submitted'] = '1';
-			$linkGP[$prefix]['submitted_ok'] = '1';
+			$linkGP[$prefix]['tstamp'] = Tx_Formhandler_Session::get('inserted_tstamp');
+			$linkGP[$prefix]['hash'] = Tx_Formhandler_Session::get('key_hash');
 		} else {
 			$linkGP['action'] = 'pdf';
-			$linkGP['submitted'] = '1';
-			$linkGP['submitted_ok'] = '1';
+			$linkGP['tstamp'] = Tx_Formhandler_Session::get('inserted_tstamp');
+			$linkGP['hash'] = Tx_Formhandler_Session::get('key_hash');
 		}
-		$linkGP['no_cache'] = 1;
-		$linkGP['dontReset'] = 1;
-		
-
-		return $this->cObj->getTypolink('PDF', $GLOBALS['TSFE']->id, $linkGP, $target);
+		return $this->cObj->getTypolink($text, $GLOBALS['TSFE']->id, $linkGP, $target);
 	}
 }
 
Index: Classes/Generator/FE/Tx_Formhandler_Generator_Csv.php
===================================================================
--- Classes/Generator/FE/Tx_Formhandler_Generator_Csv.php	(revision 39812)
+++ Classes/Generator/FE/Tx_Formhandler_Generator_Csv.php	(working copy)
@@ -10,7 +10,10 @@
 	public function process() {
 		$params = $this->gp;
 		require_once(t3lib_extMgm::extPath('formhandler') . 'Resources/PHP/parsecsv.lib.php');
-
+		$exportParams = Tx_Formhandler_StaticFuncs::getSingle($this->settings, 'exportParams');
+		if(!is_array($exportParams)) {
+			$exportParams = t3lib_div::trimExplode(',', $exportParams);
+		}
 		//build data
 		foreach($params as $key => &$value) {
 			if(is_array($value)) {
@@ -24,7 +27,7 @@
 
 		// create new parseCSV object.
 		$csv = new parseCSV();
-		$csv->output('formhandler.csv', $data, $exportParams);
+		$csv->output('formhandler.csv', $data, $params);
 		die();
 	}
 	
@@ -33,15 +36,14 @@
 		$prefix = Tx_Formhandler_Globals::$formValuesPrefix;
 		if($prefix) {
 			$linkGP[$prefix]['action'] = 'csv';
-			$linkGP[$prefix]['submitted'] = '1';
-			$linkGP[$prefix]['submitted_ok'] = '1';
+			$linkGP[$prefix]['tstamp'] = Tx_Formhandler_Session::get('inserted_tstamp');
+			$linkGP[$prefix]['hash'] = Tx_Formhandler_Session::get('key_hash');
 		} else {
 			$linkGP['action'] = 'csv';
-			$linkGP['submitted'] = '1';
-			$linkGP['submitted_ok'] = '1';
+			$linkGP['tstamp'] = Tx_Formhandler_Session::get('inserted_tstamp');
+			$linkGP['hash'] = Tx_Formhandler_Session::get('key_hash');
 		}
-		$linkGP['no_cache'] = 1;
-		$linkGP['dontReset'] = 1;
+		
 		return $this->cObj->getTypolink('CSV', $GLOBALS['TSFE']->id, $linkGP);
 	}
 }
Index: Classes/Generator/FE/Tx_Formhandler_Generator_WebkitPdf.php
===================================================================
--- Classes/Generator/FE/Tx_Formhandler_Generator_WebkitPdf.php	(revision 39812)
+++ Classes/Generator/FE/Tx_Formhandler_Generator_WebkitPdf.php	(working copy)
@@ -57,14 +57,19 @@
 	
 	public function getLink($linkGP) {
 		$params = array();
-		
-		$url = Tx_Formhandler_StaticFuncs::getHostname() . $this->cObj->getTypolink_URL($GLOBALS['TSFE']->id, $linkGP);
-		
-		$config = $this->readWebkitPdfConf();
-		$text = 'Save as PDF';
-		if($config['linkText']) {
-			$text = Tx_Formhandler_StaticFuncs::getSingle($config, 'linkText');
+		$prefix = Tx_Formhandler_Globals::$formValuesPrefix;
+		$linkGP = array();
+		if($prefix) {
+			$linkGP['submitted_ok'] = 1;
+			$linkGP[$prefix]['tstamp'] = Tx_Formhandler_Session::get('inserted_tstamp');
+			$linkGP[$prefix]['hash'] = Tx_Formhandler_Session::get('key_hash');
+		} else {
+			$linkGP['submitted_ok'] = 1;
+			$linkGP['tstamp'] = Tx_Formhandler_Session::get('inserted_tstamp');
+			$linkGP['hash'] = Tx_Formhandler_Session::get('key_hash');
 		}
+		$url = Tx_Formhandler_StaticFuncs::getHostname() . $this->cObj->getTypolink_URL($GLOBALS['TSFE']->id, $linkGP);
+		$text = $this->getLinkText();
 		
 		$params = array(
 			'tx_webkitpdf_pi1' => array(
@@ -73,11 +78,18 @@
 				)
 			),
 			'no_cache' => 1,
-			'submitted_ok' => 1
 		);
-		
 		return $this->cObj->getTypolink($text, $this->settings['pid'], $params);
 	}
+	
+	protected function getLinkText() {
+		$config = $this->readWebkitPdfConf();
+		$text = 'Save as PDF';
+		if($config['linkText']) {
+			$text = Tx_Formhandler_StaticFuncs::getSingle($config, 'linkText');
+		}
+		return $text;
+	}
 }
 
 ?>
\ No newline at end of file
Index: Classes/Generator/FE/Tx_Formhandler_AbstractGenerator.php
===================================================================
--- Classes/Generator/FE/Tx_Formhandler_AbstractGenerator.php	(revision 39812)
+++ Classes/Generator/FE/Tx_Formhandler_AbstractGenerator.php	(working copy)
@@ -2,5 +2,14 @@
 abstract class Tx_Formhandler_AbstractGenerator extends Tx_Formhandler_AbstractComponent {
 	
 	abstract public function getLink($linkGP);
+	
+	protected function getLinkText() {
+		$config = $this->settings;
+		$text = 'Save as PDF';
+		if($config['linkText']) {
+			$text = Tx_Formhandler_StaticFuncs::getSingle($config, 'linkText');
+		}
+		return $text;
+	}
 }
 ?>
\ No newline at end of file
