Von Version 15.1
bearbeitet von gru
am 02.03.2023, 10:07
Änderungskommentar: Neuen Anhang content.html hochladen
Auf Version 17.1
bearbeitet von gru
am 02.03.2023, 10:23
Änderungskommentar: Neuen Anhang content.html hochladen

Zusammenfassung

Details

content.html
Größe
... ... @@ -1,1 +1,1 @@
1 -18.1 KB
1 +17.6 KB
Inhalt
... ... @@ -178,8 +178,6 @@
178 178  }
179 179  
180 180   </script>
181 -
182 - <h1>Formular einbinden und "Externen Kontext" Seite verwenden</h1>
183 183  
184 184   <p>
185 185   </p><h2>1. Externen Kontext via iFrame einbinden z.B.</h2>
... ... @@ -203,20 +203,7 @@
203 203   <div class="hljs" id="result"></div>
204 204   <div class="wikimodel-emptyline"></div>
205 205   <h2 id="H4.Formulareinbinden:" class="wikigeneratedid"><span>4. Formular einbinden:</span></h2>
206 -
207 - <div class="box"><div class="code"><span style="color: #008000; ">window</span>.renderForm <span style="color: #666666; ">=</span> <span style="font-weight: bold; color: #008000; ">function</span>(formId){<br> <span style="font-weight: bold; color: #008000; ">var</span> myBase <span style="color: #666666; ">=</span>
208 - <span style="color: #BA2121; ">'https://help6.formcycle.eu/xwiki/bin/edit/Examples/IncludeFormViaExternalContext/'</span>;<br> <span style="font-weight: bold; color: #008000; ">var</span> fcBase <span style="color: #666666; ">=</span> <span style="color: #BA2121; ">'https://pro.formcloud.de/formcycle'</span>;<br> <span style="font-weight: bold; color: #008000; ">var</span> myFormContainer <span style="color: #666666; ">=</span> $(<span style="color: #BA2121; ">'#content'</span>);<br> &nbsp;&nbsp;<br> <span style="font-weight: bold; color: #008000; ">var</span> form <span style="color: #666666; ">=</span> $.ajax({<br>&nbsp;&nbsp;type<span style="color: #666666; ">:</span> <span style="color: #BA2121; ">"GET"</span>,<br>&nbsp;&nbsp;url<span style="color: #666666; ">:</span> fcBase <span style="color: #666666; ">+</span> <span style="color: #BA2121; ">'/form/provide/'</span> <span style="color: #666666; ">+</span> formId,<br>&nbsp;&nbsp;data <span style="color: #666666; ">:</span>{<br> &nbsp;&nbsp;<span style="font-weight: italic; color: #408080; ">//Render-Parameter<br></span> &nbsp;&nbsp; <span style="color: #BA2121; ">"xfc-rp-inline"</span><span style="color: #666666; ">:</span> <span style="font-weight: bold; color: #008000; ">true</span>, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-weight: italic; color: #408080; ">//Verwendete resourcen auflösen <br></span> &nbsp;&nbsp; <span style="color: #BA2121; ">"xfc-rp-form-only"</span><span style="color: #666666; ">:</span> <span style="font-weight: bold; color: #008000; ">true</span>, &nbsp;&nbsp;&nbsp;&nbsp; <span style="font-weight: italic; color: #408080; ">//Formular ohne HTML, BODY etc.<br></span> &nbsp;&nbsp;<span style="color: #BA2121; ">"xfc-rp-usejq"</span> <span style="color: #666666; ">:</span><span style="font-weight: bold; color: #008000; ">false</span>, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-weight: italic; color: #408080; ">//jQuery einbinden<br></span> &nbsp;&nbsp; <span style="color: #BA2121; ">"xfc-rp-keepalive"</span>
209 - <span style="color: #666666; ">:</span><span style="font-weight: bold; color: #008000; ">false</span>, &nbsp;&nbsp;&nbsp;&nbsp; <span style="font-weight: italic; color: #408080; ">//Ping zur Sessionverlängerung <br></span> &nbsp;&nbsp;<span style="color: #BA2121; ">"xfc-rp-usecss"</span> <span style="color: #666666; ">:</span><span style="font-weight: bold; color: #008000; ">true</span>, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-weight: italic; color: #408080; ">//Use Formcycle CSS files<br></span> &nbsp;&nbsp; <span style="color: #BA2121; ">"xfc-rp-useui"</span> <span style="color: #666666; ">:</span><span style="font-weight: bold; color: #008000; ">true</span>, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
210 - <span style="font-weight: italic; color: #408080; ">//jQueryUI einbinden<br></span> &nbsp;&nbsp; <span style="font-weight: italic; color: #408080; ">//Prozess-Parameter<br></span> &nbsp;&nbsp; <span style="color: #BA2121; ">"xfc-pp-external"</span><span style="color: #666666; ">:</span>
211 - <span style="font-weight: bold; color: #008000; ">true</span>, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-weight: italic; color: #408080; ">//Externer Formularrequest<br></span> &nbsp;&nbsp;<span style="color: #BA2121; ">"xfc-pp-base-url"</span>
212 - <span style="color: #666666; ">:</span>fcBase, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="font-weight: italic; color: #408080; ">//URL zum FormCycle<br></span> &nbsp;&nbsp;
213 - <span style="color: #BA2121; ">"xfc-pp-success-url"</span><span style="color: #666666; ">:</span> myBase <span style="color: #666666; ">+</span>
214 - <span style="color: #BA2121; ">"/anfrage-versendet.html"</span>, <span style="font-weight: italic; color: #408080; ">//CMS Seite bei erfolg<br></span> &nbsp;&nbsp;
215 - <span style="color: #BA2121; ">"xfc-pp-error-url"</span><span style="color: #666666; ">:</span> myBase <span style="color: #666666; ">+</span> <span style="color: #BA2121; ">"/anfrage-fehler.html"</span> &nbsp;&nbsp;<span style="font-weight: italic; color: #408080; ">//CMS Seite bei Fehler &nbsp;<br></span> &nbsp;},<br>&nbsp;&nbsp;cache<span style="color: #666666; ">:</span>
216 - <span style="font-weight: bold; color: #008000; ">false</span>,<br>&nbsp;&nbsp;async
217 - <span style="color: #666666; ">:</span>
218 - <span style="font-weight: bold; color: #008000; ">false</span>,<br>&nbsp;&nbsp;success<span style="color: #666666; ">:</span> <span style="font-weight: bold; color: #008000; ">function</span>(html){ <br>&nbsp;&nbsp;&nbsp;myFormContainer.html(html);<br>&nbsp;&nbsp;},<br>&nbsp;&nbsp;crossDomain
219 - <span style="color: #666666; ">:</span> <span style="font-weight: bold; color: #008000; ">true</span> <br>&nbsp;});<br>}</div></div>
204 + <div class="box"><div class="code"><span style="color: #008000; ">window</span>.renderForm <span style="color: #666666; ">=</span> <span style="font-weight: bold; color: #008000; ">function</span>(formId){<br> <span style="font-weight: bold; color: #008000; ">var</span> myBase <span style="color: #666666; ">=</span> <span style="color: #BA2121; ">'https://help6.formcycle.eu/xwiki/bin/edit/Examples/IncludeFormViaExternalContext/'</span>;<br> <span style="font-weight: bold; color: #008000; ">var</span> fcBase <span style="color: #666666; ">=</span> <span style="color: #BA2121; ">'https://pro.formcloud.de/formcycle'</span>;<br> <span style="font-weight: bold; color: #008000; ">var</span> myFormContainer <span style="color: #666666; ">=</span> $(<span style="color: #BA2121; ">'#content'</span>);<br> &nbsp;&nbsp;<br> <span style="font-weight: bold; color: #008000; ">var</span> form <span style="color: #666666; ">=</span> $.ajax({<br>&nbsp;&nbsp;type<span style="color: #666666; ">:</span> <span style="color: #BA2121; ">"GET"</span>,<br>&nbsp;&nbsp;url<span style="color: #666666; ">:</span> fcBase <span style="color: #666666; ">+</span> <span style="color: #BA2121; ">'/form/provide/'</span> <span style="color: #666666; ">+</span> formId,<br>&nbsp;&nbsp;data<span style="color: #666666; ">:</span>{<br> &nbsp;&nbsp;<span style="font-weight: italic; color: #408080; ">//Render-Parameter<br></span> &nbsp;&nbsp;<span style="color: #BA2121; ">"xfc-rp-inline"</span><span style="color: #666666; ">:</span><span style="font-weight: bold; color: #008000; ">true</span>, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="font-weight: italic; color: #408080; ">//Verwendete resourcen auflösen <br></span> &nbsp;&nbsp;<span style="color: #BA2121; ">"xfc-rp-form-only"</span><span style="color: #666666; ">:</span><span style="font-weight: bold; color: #008000; ">true</span>, &nbsp;&nbsp;&nbsp;&nbsp;<span style="font-weight: italic; color: #408080; ">//Formular ohne HTML, BODY etc.<br></span> &nbsp;&nbsp;<span style="color: #BA2121; ">"xfc-rp-usejq"</span><span style="color: #666666; ">:</span><span style="font-weight: bold; color: #008000; ">false</span>, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="font-weight: italic; color: #408080; ">//jQuery einbinden<br></span> &nbsp;&nbsp;<span style="color: #BA2121; ">"xfc-rp-keepalive"</span><span style="color: #666666; ">:</span><span style="font-weight: bold; color: #008000; ">false</span>, &nbsp;&nbsp;&nbsp;&nbsp;<span style="font-weight: italic; color: #408080; ">//Ping zur Sessionverlängerung <br></span> &nbsp;&nbsp;<span style="color: #BA2121; ">"xfc-rp-usecss"</span><span style="color: #666666; ">:</span><span style="font-weight: bold; color: #008000; ">true</span>, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="font-weight: italic; color: #408080; ">//Use Formcycle CSS files<br></span> &nbsp;&nbsp;<span style="color: #BA2121; ">"xfc-rp-useui"</span><span style="color: #666666; ">:</span><span style="font-weight: bold; color: #008000; ">true</span>, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="font-weight: italic; color: #408080; ">//jQueryUI einbinden<br></span> &nbsp;&nbsp;<span style="font-weight: italic; color: #408080; ">//Prozess-Parameter<br></span> &nbsp;&nbsp;<span style="color: #BA2121; ">"xfc-pp-external"</span><span style="color: #666666; ">:</span><span style="font-weight: bold; color: #008000; ">true</span>, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="font-weight: italic; color: #408080; ">//Externer Formularrequest<br></span> &nbsp;&nbsp;<span style="color: #BA2121; ">"xfc-pp-success-url"</span><span style="color: #666666; ">:</span> myBase <span style="color: #666666; ">+</span> <span style="color: #BA2121; ">"/anfrage-versendet.html"</span>, <span style="font-weight: italic; color: #408080; ">//CMS Seite bei erfolg<br></span> &nbsp;&nbsp;<span style="color: #BA2121; ">"xfc-pp-error-url"</span><span style="color: #666666; ">:</span> myBase <span style="color: #666666; ">+</span> <span style="color: #BA2121; ">"/anfrage-fehler.html"</span> &nbsp;&nbsp;<span style="font-weight: italic; color: #408080; ">//CMS Seite bei Fehler &nbsp;<br></span> &nbsp;},<br>&nbsp;&nbsp;cache<span style="color: #666666; ">:</span> <span style="font-weight: bold; color: #008000; ">false</span>,<br>&nbsp;&nbsp;async<span style="color: #666666; ">:</span> <span style="font-weight: bold; color: #008000; ">false</span>,<br>&nbsp;&nbsp;success<span style="color: #666666; ">:</span><span style="font-weight: bold; color: #008000; ">function</span>(html){ <br>&nbsp;&nbsp;&nbsp;myFormContainer.html(html);<br>&nbsp;&nbsp;},<br>&nbsp;&nbsp;crossDomain<span style="color: #666666; ">:</span> <span style="font-weight: bold; color: #008000; ">true</span><br>&nbsp;});<br>}</div></div>
220 220   <div class="wikimodel-emptyline"></div>
221 221   <h2 id="H5.ErgebenisFormular:" class="wikigeneratedid"><span>5. Ergebnis Formular:</span></h2>
222 222   <div class="hljs" id="content">