Categories

Dynamic SWiSH. How to create a contact form

Template-help.com Team November 15, 2010
Rating: 5.0/5. From 1 vote.
Please wait...

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 “Text_fields” sprite you can copy from the example below:

 
onLoad(){
   
   recipient=_root.mail;
    _root.serv=”php”;
   _parent.fields_descriptions= Array (“”,
    Array(“t1”, “your_name”, “Your Name:”),
    Array(“t2”, “your_email”, “Your Email:”),
    Array(“t3”, “telephone”, “Telephone:”),
    Array(“t4”, “message”, “Message:”),
    Array(“t5”, “address”, “Your Address:”),
    Array(“t6”, “123”, “Your wegweg:”),

);   
}
 

The script for Hit area of “Submit” button:

 
on (rollOver) {
    this.gotoAndPlay(“s1”);
}
on (releaseOutside, rollOut) {
    this.gotoAndPlay(“s2”);
}
on (release) {
      
       for (i=1; i<_parent._parent.fields_descriptions.length; i++) {
           if (_parent[_parent._parent.fields_descriptions[i][0]].text!=””)  {
           this[_parent._parent.fields_descriptions[i][1]]=_parent[_parent._parent.fields_descriptions[i][0]].text+”&777&”+_parent._parent.fields_descriptions[i][2];
           }
        }
      this.recipient=_parent.recipient;
   
     
    getURL(“contact.”+_root.serv, “_blank”, “POST”);
  
    
}
 

The script for Hit area of “Clear” button:

 
on (rollOver){
    gotoAndPlay(“s1”);
}
on (rollOut){
    gotoAndPlay(“s2”);
}
on (release) {
     for (i=1; i<_parent._parent.fields_descriptions.length; i++) {
          _parent[_parent._parent.fields_descriptions[i][0]].text=””;
        }
}
 
This entry was posted in SWISH Template Tutorials, Working with Swish and tagged contact form, forms, swish, SwishMax. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket