| ... |
... |
@@ -1,80 +22,4 @@ |
| 1 |
|
-== 1. Externen Kontext via iFrame einbinden z.B. == |
| 2 |
|
- |
| 3 |
|
-[[https://pro.form.cloud/formcycle/external/forms/main.xhtml]] |
| 4 |
|
- |
| 5 |
|
-TODO: iframe |
| 6 |
|
- |
| 7 |
|
-== 2. Eventlistener für Formularauswahl registrieren z.B.: == |
| 8 |
|
- |
| 9 |
|
- |
| 10 |
|
- |
| 11 |
|
- |
| 12 |
|
-{{code language="javascript"}}function myFormCycleCallback(msg){ |
| 13 |
|
- $('#result').html('Nachricht von: "<b>' + msg.origin + '</b>" Formular mit id: "<b>' + msg.data + '</b>" wurde ausgewählt.' ); |
| 14 |
|
- renderForm(msg.data); |
| 15 |
|
-} |
| 16 |
|
- |
| 17 |
|
-window.addEventListener("message", myFormCycleCallback, false);{{/code}} |
| 18 |
|
- |
| 19 |
|
- |
| 20 |
|
-== 3. Ergebenis speichern: == |
| 21 |
|
- |
| 22 |
22 |
{{html clean="false"}} |
| 23 |
|
- <div class="hljs" id="result"></div> |
| 24 |
|
-{{/html}} |
| 25 |
|
- |
| 26 |
|
- |
| 27 |
|
-== 4. Formular einbinden: == |
| 28 |
|
- |
| 29 |
|
-{{code language="js"}} |
| 30 |
|
-window.renderForm = function(formId){ |
| 31 |
|
- var myBase = 'https://help6.formcycle.eu/xwiki/bin/edit/Examples/IncludeFormViaExternalContext/'; |
| 32 |
|
- var fcBase = 'https://pro.formcloud.de/formcycle'; |
| 33 |
|
- var myFormContainer = $('#content'); |
| 34 |
|
- |
| 35 |
|
- var form = $.ajax({ |
| 36 |
|
- type: "GET", |
| 37 |
|
- url: fcBase + '/form/provide/' + formId, |
| 38 |
|
- data:{ |
| 39 |
|
- //Render-Parameter |
| 40 |
|
- "xfc-rp-inline":true, //Verwendete resourcen auflösen |
| 41 |
|
- "xfc-rp-form-only":true, //Formular ohne HTML, BODY etc. |
| 42 |
|
- "xfc-rp-usejq":false, //jQuery einbinden |
| 43 |
|
- "xfc-rp-keepalive":false, //Ping zur Sessionverlängerung |
| 44 |
|
- "xfc-rp-usecss":true, //Use Formcycle CSS files |
| 45 |
|
- "xfc-rp-useui":true, //jQueryUI einbinden |
| 46 |
|
- //Prozess-Parameter |
| 47 |
|
- "xfc-pp-external":true, //Externer Formularrequest |
| 48 |
|
- "xfc-pp-base-url":fcBase, //URL zum FormCycle |
| 49 |
|
- "xfc-pp-success-url": myBase + "/anfrage-versendet.html", //CMS Seite bei erfolg |
| 50 |
|
- "xfc-pp-error-url": myBase + "/anfrage-fehler.html" //CMS Seite bei Fehler |
| 51 |
|
- }, |
| 52 |
|
- cache: false, |
| 53 |
|
- async: false, |
| 54 |
|
- success:function(html){ |
| 55 |
|
- myFormContainer.html(html); |
| 56 |
|
- }, |
| 57 |
|
- crossDomain: true |
| 58 |
|
- }); |
| 59 |
|
-} |
| 60 |
|
-{{/code}} |
| 61 |
|
- |
| 62 |
|
- |
| 63 |
|
-== 5. Ergebenis Formular: == |
| 64 |
|
- |
| 65 |
|
-{{html clean="false"}} |
| 66 |
|
- <div class="hljs" id="content"></div> |
| 67 |
|
-{{/html}} |
| 68 |
|
- |
| 69 |
|
- |
| 70 |
|
- |
| 71 |
|
- |
| 72 |
|
- |
| 73 |
|
- |
| 74 |
|
- |
| 75 |
|
-Für das folgenden Beispiel wird zu Demonstrationszwecken eine eigene [[HTML-Seite>>attach:iframe.html]] in einem iframe dargestellt: |
| 76 |
|
- |
| 77 |
|
-{{html clean="false"}} |
| 78 |
78 |
<style type="text/css"> |
| 79 |
79 |
pre{ |
| 80 |
80 |
margin:0; |
| ... |
... |
@@ -118,6 +118,10 @@ |
| 118 |
118 |
</style> |
| 119 |
119 |
|
| 120 |
120 |
<div class="resizer border" style="height: 1000px;"> |
| 121 |
|
- <iframe id="customerdemo" class="resized" src="https://help7.formcycle.eu/xwiki/bin/download/Examples/IncludeAJAX/iframe.html"></iframe> |
|
45 |
+ <iframe id="content" class="content" src="https://help7.formcycle.eu/xwiki/bin/download/Examples/IncludeExternalContext/content.html"></iframe> |
| 122 |
122 |
</div> |
| 123 |
123 |
{{/html}} |
|
48 |
+ |
|
49 |
+Hinweis: Aus Kompatibilitätsgründen wird der Inhalt auf dieser Seite in einem iframe dargestellt. |
|
50 |
+ |
|
51 |
+ |