<?xml version="1.0" encoding="utf-8"?>
	
		<feed xmlns="http://www.w3.org/2005/Atom">
			<title type="text">MODX Deutschland - Forum - eForm - Dankesnachricht in neuem Dokument</title>
			<updated>2013-05-23T02:54:49+02:00</updated>
			<id>http://www.modxcms.de/forum/</id>
			<link rel="alternate" type="text/html" hreflang="en"
				href="http://www.modxcms.de/forum/comments.php?DiscussionID=3528&amp;Focus=33023&amp;page=1"/>
			<link rel="self" type="application/atom+xml"
				href="http://www.modxcms.de/forum/comments.php?DiscussionID=3528&amp;Focus=33023&amp;Feed=ATOM&amp;page=1"/>
			<generator
				uri="http://getvanilla.com/"
				version="1.1.2">
				Lussumo Vanilla &amp; Feed Publisher
			</generator>
			<entry>
		<title>eForm - Dankesnachricht in neuem Dokument</title>
		<link rel="alternate" href="http://www.modxcms.de/forum/comments.php?DiscussionID=3528&amp;Focus=20312#Comment_20312" type="application/xhtml+xml" hreflang="en"/>
		<id>http://www.modxcms.de/forum/comments.php?DiscussionID=3528&amp;Focus=20312#Comment_20312</id>
		<published>2010-03-03T10:33:59+01:00</published>
		<updated>2010-03-03T10:34:25+01:00</updated>
		<author>
			<name>mic</name>
			<uri>http://www.modxcms.de/forum/account.php?u=1569</uri>
		</author>
		<summary type="text" xml:lang="en">
			Hallo, 

ich habe per eForm ein Formular erstellt, das wie gewünscht funktioniert. Nun möchte ich aber die Dankesnachricht (&amp;thankyou) nicht direkt im selben Fenster ausgeben, in dem sich ...
		</summary>
		<content type="html">
			<![CDATA[Hallo, <br /><br />ich habe per eForm ein Formular erstellt, das wie gewünscht funktioniert. Nun möchte ich aber die Dankesnachricht (&thankyou) nicht direkt im selben Fenster ausgeben, in dem sich auch das Kontaktformular befindet, sondern in einem eigenen Dokument (die Zielseite sollte nämlich für ein sauberes Conversion-Tracking eine eigene URL aufweisen). Leider ist mir das nicht gelungen.<br /><br />Ich verwende folgenden Aufruf im Formular: <br /><code>[!eForm? &formid=`feedbackForm` &to=`xy@xy.de` &tpl=`kontakt_template` &report=`kontakt_email` &thankyou=`kontakt_dankesnachricht` &gotoid=`3` &subject=`Anfrage auf xy.de`!]</code><br /><br />Auf der entsprechenden Zielseite wird das Chunk {{kontakt_dankesnachricht}} aufgerufen.<br />Zwar werden an dieser Stelle nach Versenden des Formulars die im Chunk definierten Eingabefelder korrekt angezeigt, die tatsächlichen Eingaben des Users fehlen allerdings.<br /><br />Das Chunk {{kontakt_dankesnachricht}} beinhaltet folgende Angaben: <br /><code>&lt;h3&gt;Vielen Dank für Ihre E-Mail&lt;/h3&gt;<br />&lt;p&gt;<br />	Wir werden uns baldmöglichst mit Ihnen in Verbindung setzen.<br />&lt;/p&gt;<br />&lt;p&gt;Ihre E-Mail:&lt;/p&gt;<br />&lt;p&gt;Name:&lt;br /&gt;[+k_name+]&lt;/p&gt;<br />&lt;p&gt;E-Mail:&lt;br /&gt;[+k_email+]&lt;/p&gt;<br />&lt;p&gt;Nachricht:&lt;br /&gt;[+k_nachricht+]&lt;/p&gt;<br /></code><br /><br />Es würde mich sehr freuen, wenn mir jemand einen Tipp geben könnte, wie die Ausgabe der Dankesnachricht in einem neuen Dokument bewerkstelligt werden kann. Gibt es vielleicht ein gutes HowTo hierzu?<br /><br />Vielen Dank.]]>
		</content>
	</entry>
	<entry>
		<title>eForm - Dankesnachricht in neuem Dokument</title>
		<link rel="alternate" href="http://www.modxcms.de/forum/comments.php?DiscussionID=3528&amp;Focus=20333#Comment_20333" type="application/xhtml+xml" hreflang="en"/>
		<id>http://www.modxcms.de/forum/comments.php?DiscussionID=3528&amp;Focus=20333#Comment_20333</id>
		<published>2010-03-03T22:37:52+01:00</published>
		<updated>2013-05-23T02:54:49+02:00</updated>
		<author>
			<name>Marc</name>
			<uri>http://www.modxcms.de/forum/account.php?u=2</uri>
		</author>
		<summary type="text" xml:lang="en">
			Probier mal:

[code]&amp;thankyou=`3` &amp;gotoid=`3`[/code]

Und binde den Chunk in dem Dokument ein.
		</summary>
		<content type="html">
			<![CDATA[Probier mal:<br /><br /><code>&thankyou=`3` &gotoid=`3`</code><br /><br />Und binde den Chunk in dem Dokument ein.]]>
		</content>
	</entry>
	<entry>
		<title>eForm - Dankesnachricht in neuem Dokument</title>
		<link rel="alternate" href="http://www.modxcms.de/forum/comments.php?DiscussionID=3528&amp;Focus=20378#Comment_20378" type="application/xhtml+xml" hreflang="en"/>
		<id>http://www.modxcms.de/forum/comments.php?DiscussionID=3528&amp;Focus=20378#Comment_20378</id>
		<published>2010-03-05T09:12:13+01:00</published>
		<updated>2013-05-23T02:54:49+02:00</updated>
		<author>
			<name>mic</name>
			<uri>http://www.modxcms.de/forum/account.php?u=1569</uri>
		</author>
		<summary type="text" xml:lang="en">
			Danke für den Hinweis. Das habe ich auch schon probiert. Leider hat es nicht funktioniert. Die Formularfelder werden dann zwar korrekt wiedergegeben, die Eingaben des Users aber nicht.
		</summary>
		<content type="html">
			<![CDATA[Danke für den Hinweis. Das habe ich auch schon probiert. Leider hat es nicht funktioniert. Die Formularfelder werden dann zwar korrekt wiedergegeben, die Eingaben des Users aber nicht.]]>
		</content>
	</entry>
	<entry>
		<title>eForm - Dankesnachricht in neuem Dokument</title>
		<link rel="alternate" href="http://www.modxcms.de/forum/comments.php?DiscussionID=3528&amp;Focus=33007#Comment_33007" type="application/xhtml+xml" hreflang="en"/>
		<id>http://www.modxcms.de/forum/comments.php?DiscussionID=3528&amp;Focus=33007#Comment_33007</id>
		<published>2012-05-16T22:36:03+02:00</published>
		<updated>2013-05-23T02:54:49+02:00</updated>
		<author>
			<name>skipjack66</name>
			<uri>http://www.modxcms.de/forum/account.php?u=910</uri>
		</author>
		<summary type="text" xml:lang="en">
			Hallo zusammen,

ich hab das gleiche Problem. Leider ist auch im internationalen Forum nichs zu finden.

Weiß jemand mehr darüber?

Danke &amp; Grüße!
Marcus
		</summary>
		<content type="html">
			<![CDATA[Hallo zusammen,<br /><br />ich hab das gleiche Problem. Leider ist auch im internationalen Forum nichs zu finden.<br /><br />Weiß jemand mehr darüber?<br /><br />Danke & Grüße!<br />Marcus]]>
		</content>
	</entry>
	<entry>
		<title>eForm - Dankesnachricht in neuem Dokument</title>
		<link rel="alternate" href="http://www.modxcms.de/forum/comments.php?DiscussionID=3528&amp;Focus=33023#Comment_33023" type="application/xhtml+xml" hreflang="en"/>
		<id>http://www.modxcms.de/forum/comments.php?DiscussionID=3528&amp;Focus=33023#Comment_33023</id>
		<published>2012-05-20T18:21:53+02:00</published>
		<updated>2013-05-23T02:54:49+02:00</updated>
		<author>
			<name>manu37</name>
			<uri>http://www.modxcms.de/forum/account.php?u=210</uri>
		</author>
		<summary type="text" xml:lang="en">
			Wenn ich den Code anschaue, heisst der paramenter nicht &amp;gotoid=, sondern &amp;gid=.
Nur sind dann im Zieldokument die Feldinhalte nicht mehr verfügbar.
		</summary>
		<content type="html">
			<![CDATA[Wenn ich den Code anschaue, heisst der paramenter nicht &gotoid=, sondern &gid=.<br />Nur sind dann im Zieldokument die Feldinhalte nicht mehr verfügbar.]]>
		</content>
	</entry>
	<entry>
		<title>eForm - Dankesnachricht in neuem Dokument</title>
		<link rel="alternate" href="http://www.modxcms.de/forum/comments.php?DiscussionID=3528&amp;Focus=33025#Comment_33025" type="application/xhtml+xml" hreflang="en"/>
		<id>http://www.modxcms.de/forum/comments.php?DiscussionID=3528&amp;Focus=33025#Comment_33025</id>
		<published>2012-05-21T15:46:23+02:00</published>
		<updated>2013-05-23T02:54:49+02:00</updated>
		<author>
			<name>sam</name>
			<uri>http://www.modxcms.de/forum/account.php?u=1689</uri>
		</author>
		<summary type="text" xml:lang="en">
			[quote]Wenn ich den Code anschaue, heisst der paramenter nicht &amp;gotoid=, sondern &amp;gid=. [/quote]Im eForm-Snippet 1.4.4.6, Ziele 57 steht:[code]   'gid' =&gt; isset($gotoid)? ...
		</summary>
		<content type="html">
			<![CDATA[<blockquote>Wenn ich den Code anschaue, heisst der paramenter nicht &gotoid=, sondern &gid=. </blockquote>Im eForm-Snippet 1.4.4.6, Ziele 57 steht:<code>   'gid' =&gt; isset($gotoid)? $gotoid:$modx-&gt;documentIdentifier,</code>Das bedeutet, dass der Parameter <em><strong>&gotoid</strong></em> heißt und als <em><strong>$params['gid']</strong></em> in den Parameter-Array übergeben und von eForm verwendet wird. Wenn kein <em>&gotoid</em>-Parameter angegeben ist, wird die ID der aktuellen Ressource verwendet.<br /><br /><blockquote>Nur sind dann im Zieldokument die Feldinhalte nicht mehr verfügbar. </blockquote>Wenn die <em>&gotoid</em> nicht die ID der Ressource ist, von der der eForm-Aufruf erfolgt, dann werden die eForm-Platzhalter nicht in die Zielressource übernommen und der <em>&thankyou</em>-Parameter wird ignoriert. (siehe <em>eform.inc.php</em>, Zeile 553ff)<br /><br /><br />Damit die Formularfelder auch in der umgeleiteten Ressource verwendet werden können, <u>hier eine mögliche Lösung:</u><br />Eine Funktion schreiben, welche die Formulardaten vor dem Versenden in eine globale Variable speichert und diese dann über ein Snippet in der thankyou-Ressource auslesen und in Platzhalter verwandeln.<br /><br /><u>Beispiel:</u><br />Snippet "<em><strong>onBeforeSent</strong></em>" anlegen<code>&lt;?php<br />function setFormFields(&$fields) {<br />&nbsp;&nbsp;&nbsp;&nbsp;global $modx;<br />&nbsp;&nbsp;&nbsp;&nbsp;$modx-&gt;config['eFormFields'] = $fields;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;return true;<br />}<br /><br />return;<br />?&gt;</code>in der Formular-Ressource vor dem eForm-Aufruf eintragen<br />und dem eForm-Snippet-Aufruf den Parameter <em>&eFormOnBeforeMailSent</em> hinzufügen<code>[!onBeforeSent!]<br />[!eForm?<br />...<br />&eFormOnBeforeMailSent=`setFormFields` <br />!]</code><br />Snippet "<strong><em>getFormFields</em></strong>" erstellen<code>&lt;?php<br />$fields = array();<br />foreach($modx-&gt;config['eFormFields'] as $key =&gt; $val) {<br />&nbsp;&nbsp;&nbsp;&nbsp;$fields['[+'.$key.'+]'] = $val;<br />}<br />return str_replace(array_keys($fields), array_values($fields), $modx-&gt;getChunk($chunk));<br />?&gt;</code>und den Snippet-Aufruf in die Resource eintragen, welche über den <em>&gotoid</em>-Parameter aufgerufen wird<code>[!getFormFields?chunk=`kontakt_dankesnachricht`!]</code><br />Der <em>&thankyou</em>-Parameter wird dabei nicht benötigt.]]>
		</content>
	</entry>
	
		</feed>