{"id":1839,"date":"2010-11-15T10:24:59","date_gmt":"2010-11-15T10:24:59","guid":{"rendered":"http:\/\/mts-help.nick.php.dev\/after_sale_support\/Working_with_SWISHMax\/article7.html"},"modified":"2020-01-31T04:58:15","modified_gmt":"2020-01-31T09:58:15","slug":"how-create-contact-form-4","status":"publish","type":"post","link":"https:\/\/www.templatemonster.com\/help\/how-create-contact-form-4.html","title":{"rendered":"Dynamic SWiSH. How to create a contact form"},"content":{"rendered":"First of all, please check a video tutorial on how to create a contact form in Dynamic SWiSH site here. <br \/> <br \/>A <span style=\"FONT-WEIGHT: bold\">.ZIP<\/span> file with an example of a general contact form in SWiSH (<span style=\"FONT-WEIGHT: bold\">Contact.swi<\/span>), <span style=\"FONT-WEIGHT: bold\">contact.php<\/span> and <span style=\"FONT-WEIGHT: bold\">contact.asp<\/span> you can download <a class=\"link3\" href=\"..\/..\/..\/..\/files\/swishmax\/swish_contact_form.zip\">here<\/a>. <br \/> <br \/>The script for &#8220;Text_fields&#8221; sprite you can copy from the example below: <br \/> <br \/> <div class=\"example_code\">&nbsp; <br \/>onLoad(){ <br \/>&nbsp;&nbsp;&nbsp; <br \/>&nbsp;&nbsp; recipient=_root.mail; <br \/>&nbsp;&nbsp;&nbsp; _root.serv=&#8221;php&#8221;; <br \/>&nbsp;&nbsp; _parent.fields_descriptions= Array (&#8220;&#8221;, <br \/>&nbsp;&nbsp;&nbsp; Array(&#8220;t1&#8221;, &#8220;your_name&#8221;, &#8220;Your Name:&#8221;), <br \/>&nbsp;&nbsp;&nbsp; Array(&#8220;t2&#8221;, &#8220;your_email&#8221;, &#8220;Your Email:&#8221;), <br \/>&nbsp;&nbsp;&nbsp; Array(&#8220;t3&#8221;, &#8220;telephone&#8221;, &#8220;Telephone:&#8221;), <br \/>&nbsp;&nbsp;&nbsp; Array(&#8220;t4&#8221;, &#8220;message&#8221;, &#8220;Message:&#8221;), <br \/>&nbsp;&nbsp;&nbsp; Array(&#8220;t5&#8221;, &#8220;address&#8221;, &#8220;Your Address:&#8221;), <br \/>&nbsp;&nbsp;&nbsp; Array(&#8220;t6&#8221;, &#8220;123&#8221;, &#8220;Your wegweg:&#8221;), <br \/> <br \/>);&nbsp;&nbsp;&nbsp; <br \/>} <br \/>&nbsp;<\/div> <br \/>The script for Hit area of <span style=\"FONT-WEIGHT: bold\">&#8220;Submit&#8221;<\/span> button: <br \/> <br \/> <div class=\"example_code\">&nbsp; <br \/>on (rollOver) { <br \/>&nbsp;&nbsp;&nbsp; this.gotoAndPlay(&#8220;s1&#8221;); <br \/>} <br \/>on (releaseOutside, rollOut) { <br \/>&nbsp;&nbsp;&nbsp; this.gotoAndPlay(&#8220;s2&#8221;); <br \/>} <br \/>on (release) { <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for (i=1; i&lt;_parent._parent.fields_descriptions.length; i++) { <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (_parent[_parent._parent.fields_descriptions[i][0]].text!=&#8221;&#8221;)&nbsp; { <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this[_parent._parent.fields_descriptions[i][1]]=_parent[_parent._parent.fields_descriptions[i][0]].text+&#8221;&amp;777&amp;&#8221;+_parent._parent.fields_descriptions[i][2]; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.recipient=_parent.recipient; <br \/>&nbsp;&nbsp;&nbsp; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br \/>&nbsp;&nbsp;&nbsp; getURL(&#8220;contact.&#8221;+_root.serv, &#8220;_blank&#8221;, &#8220;POST&#8221;); <br \/>&nbsp;&nbsp; <br \/>&nbsp;&nbsp;&nbsp;&nbsp; <br \/>} <br \/>&nbsp;<\/div> <br \/>The script for Hit area of <span style=\"FONT-WEIGHT: bold\">&#8220;Clear&#8221;<\/span> button: <br \/> <br \/> <div class=\"example_code\">&nbsp; <br \/>on (rollOver){ <br \/>&nbsp;&nbsp;&nbsp; gotoAndPlay(&#8220;s1&#8221;); <br \/>} <br \/>on (rollOut){ <br \/>&nbsp;&nbsp;&nbsp; gotoAndPlay(&#8220;s2&#8221;); <br \/>} <br \/>on (release) { <br \/>&nbsp;&nbsp;&nbsp;&nbsp; for (i=1; i&lt;_parent._parent.fields_descriptions.length; i++) { <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _parent[_parent._parent.fields_descriptions[i][0]].text=&#8221;&#8221;; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } <br \/>} <br \/>&nbsp;<\/div>","protected":false},"excerpt":{"rendered":"<p>First of all, please check a video tutorial on how to create a contact form in Dynamic SWiSH site here. A .ZIP file with an example of a general contact form in SWiSH (Contact.swi), contact.php and contact.asp you can download here. The script for &#8220;Text_fields&#8221; sprite you can copy from the example below: &nbsp; onLoad(){ [&hellip;]<\/p>\n","protected":false},"author":13,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[757,278],"tags":[497,509,574,573],"_links":{"self":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/1839"}],"collection":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/comments?post=1839"}],"version-history":[{"count":3,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/1839\/revisions"}],"predecessor-version":[{"id":86101,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/1839\/revisions\/86101"}],"wp:attachment":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media?parent=1839"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/categories?post=1839"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/tags?post=1839"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}