| ||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||
| BoxedArt > Template Tutorial > Other Website Template Management Tips > Getting a Contact Form to Submit with a Formmail Script |
||||||||||||||||||||||||||||||||||||||
The BoxedArt Guide to Using Website TemplatesGetting a Contact Form to Submit with a Formmail ScriptSetting Up an HTML Contact FormFirst, download and extract the the php form mail script. After the script is extracted, in a text editor such as Notepad, open the formmail-php.php file. Follow the instructions in the formmail-php.php file for customizing variables and entering the email address where you want to receive messages from the form. Save the formmail-php.php into the same folder as your .html files. Next, open the html file from your template that has a contact form in it. In the HTML source code, just beneath the top <body> tag, put these two tags: <form method="post"
action="formmail-php.php"> Then, also in the html file's source code, locate the template's "send" button image, which could look like this: <img src="images/b_send.gif" /> Change the image to a form element so the tag reads: <input type="image" src="images/b_send.gif" /> And lastly, just above the closing </body> tag at the bottom of your page's source code, type </form> Save both the formailphp.php and the html files, and upload them to the same folder on your web server. Setting Up a Flash Contact FormFirst, download and extract the the php flash
form mail script. After the script is extracted,Open the
flashformmail.php in a text editor such as Notepad. Next, launch Flash and open the .fla file that contains the form. The Input text fields in your Flash movie's form need to be combined into one MovieClip symbol. To do this: Choose the black arrow tool from the toolbar and,
holding down the Shift key on your keyboard, click on each of the Input
text fields to select them all at once: When the text fields are selected, press the F8 key on
your keyboard to bring up the Convert to Symbol box. With the "form" MovieClip still selected, go to Edit
> Edit in Place from Flash's top menu. This takes you inside the
MovieClip's timeline. For the Input text field that will have the visitor's email address, select the text field and give it the variable email For the Input text field that will have the visitor's message, select the text field and give it the variable message Next, click on the Send button to select it. Note -
make sure the word Send is actually a button and not just text. With it
selected, look in the Properties panel to see what type of item it is. If
it says "Static Text" or "Dynamic Text", or "Graphic" or "Movie clip", you
need to convert it to a button symbol. To do this, make sure it's selected
on the stage, and then press the F8 key on your keyboard. In the Convert
to Symbol box that opens, name it send and choose Button as
the type: Save your .fla file, and press the Ctrl and Enter keys on your keyboard to create the new .swf file. Make sure to move or copy this new .swf file into the same folder as any .html, other .swf files (and the flashformmail.php file) that make up your site.
|
||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||
|
Copyright ©
2007 Big Resources, Inc. All Rights
Reserved |