Below we will introduce the essential Form Decode tag that you need to place into your HTML file, the composite elements of the a form (text field, radio buttons, pull-down menus, check boxes, and text boxes) and finish with a sample. Essential tags (without them your form will not work) are clearly marked as such.
Using Form Decode
To use Form Decode, you will take the tags mentioned below and place them into your HTML file (anywhere inside the main body <BODY> - </BODY> ) using a text editor or your homepage creation software.
You will upload that HTML file to the FTP server using your FTP software.
The operation of Form Decode can then be confirmed by opening the uploaded HTML page in a Web browser.
Please use the Form Decode tag that corresponds to the homepage service that you are using.
Please enter the Form Decode tag accurately.
The Opening Tag
This is an essential tag.
This example Form Decode tag tells the Web browser where to send the data that has been input into your form. The tag shown is specific to the Individual Homepage service.
The following is an example of a tag to create a text field in your form. The example allows up to 30 characters to be entered into the text field. Data that has been entered into the text field is sent to you by email, and will be listed in the email prefixed with 'NAME=' to let you know which field it came from.
The text area provides an area to enter an unlimited number of lines of text (up to 32k).
Include "WRAP" within the TEXTAREA tag to make typing long lines a little easier for the people who use your form.
Text included between "<TEXTAREA>" and "</TEXTAREA>" tags will show up in the text area box, but may be erased by the person filling out the form.
<textarea name="COMMENT" ROWS="5" COLS="45" WRAP>Enter your comment here...</textarea>
Tell Form Decode Where To Send The Data
This is an essential tag.
Form Decode needs to know to which email address to send the data that has been input into the form. This example shows the email address email@example.com being assigned as the email address. Please use your own email address instead of this example.
If you leave this tag out, the subject of the email you receive containing input data will be (output from formdecode.cgi). So for the "value=" part of the tag, please enter your own subject.
<input type="hidden" name="_subject" value="Enter any subject here...">
Controlling What Happens After Submit Is Pressed
After clicking the Submit button on your form, you can take the user to another one of your pages, such as a "Thank you" page you have created, by using one of the following tags.
Enter a filename of an html page to be displayed:
<input type="hidden" name="_accept_html" value="filename.html">
filename.html should indicate an HTML file within the same directory as the webform. Don't include http://... etc., just the filename.
Enter the URL of a file to be displayed after submit is pressed:
<input type="hidden" name="_accept_url" value="http://www.asahi-net.or.jp/en/index.html">
Send and Reset Buttons
These are essential.
No form can work without these buttons. Here are two examples.
<input type="submit" value="Send">
<input type="reset" value="Reset">
The 'value' is optional. If you leave it out, the default buttons will read the Japanese equivalent of 'Submit' and 'Reset'.
An essential tag.
Last but not least, don't forget this tag to indicate the end of the form.
Here's an example form made combining the Table tag and the Form Decode CGI tags.
Vote for Your Favorite Movie
You can fill this form out, but clicking the Vote button will only send you to the top of this page. The Source Code below is the source that made this form - you may copy it and modify it for your own use if you wish.
These are the HTML tags and Form Decode tags used to create the Example Form above.
<tr align=center><td colspan=2>
<b>Vote for Your Favorite Movie</b>
<tr><td align=right valign=top>My favorite movie of 2005 was:</td>
<td align=left><SELECT NAME="FAV_MOVIE" SIZE="1">
<OPTION SELECTED>Batman Begins
<OPTION>Wallace and Gromit
<OPTION>War of the Worlds