What's new
Guest viewing is limited

HTML Form

McStormify

Expert Talker
PF Member
Messages
836
Highlights
0
Reaction score
0
Points
602
Peak Coin
0.000000¢
DB Transfer
0.000000¢
Hi there!

Today, I'm going to teach you how to make a HTML form. It is very easy to make a HTML form.

A simple form with the text area and Send Button:

Code:
<form method="post" action="mailto:name@site.com">
   <input type="text" name="body"> 
   <input type="submit" value="Send">
</form>

All you have to do is replace the "emailaddress@host.com" with your e-mail address.



There are three main tags in a HTML form. <input>, <select> and <textarea>. Here are the codes for various fields that may help with your HTML form!

Textbox

Code:
<input type=\"text\" value=\"content\" name=\"a name\" size=\"25\">

Text Area

Code:
<textarea name=\"a name\" rows=\"6\" cols=\"20\"> </textarea>

Drop-Down Menu

Code:
<select size=\"1\" name=\"menu\"> 
   <option>no. 1</option> 
   <option selected=\"selected\">no. 2</option>
   <option>no. 3</option> 
</select>

Hidden Field

Code:
<input type=\"hidden\" name=\"hidden\" value=\"something secret stands here\">

Password

Code:
Password <input type="password" name="code" value="" size="10">

Radio Buttons

Code:
<input type="radio" name="radio field" value="no1"> Option 1
<input type="radio" name="radio field" value="no2" checked="checked"> Option 2

Check boxes

Code:
<input type="checkbox" name="check1" value="chosed"> Option 1
<input type="checkbox" name="check2" value="chosed" checked="checked"> Option 2

I hope this helps you to create your first HTML form!

A demo can be found be clicking here.

Thanks guys. :)
 
Nice. But can you make it so I wont get this message in my inbox:
Code:
body=Test&%5C%22a=+Testing+message...&%5C%22menu%5C%22=no.+2&code=What+here%3F&radio+field=button+2&check2=chosed
That was my test result...
How can I format the text message and options selected to make it readable?
 
Re:
HTML:
 HTML Form[/b]

It does launch the mail but it comes out with something strange - a code I don't read that's why I was asking WebArtz for a simple version.
 
Re:
HTML:
 HTML Form[/b]

<!-- m --><a class="postlink" href="http://world-dezign.forumotion.com/Form-Tutorial-h14.htm">http://world-dezign.forumotion.com/Form ... al-h14.htm</a><!-- m -->
 
Back
Top