GetDotted Domains

Viewing Thread:
"HTML Forms"

The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Wed 22/11/06 at 22:30
Regular
"all good things..."
Posts: 25
Here are just some pointers on how to put forms on your website using html.

Firstly, a form is defined by a <form> tag. Ingenious

Then there is the wonderful <input> tag.

There are many different types of input to suit different forms. For example, if you wanted someone to type in their name or address then the input type you would use would be "text".

If you wanted someone to select their gender then you would use a "checkbox" or "radio" input type, becuase you want them to select from a set number of options. You wouldn't use any of these inout types for the scenario above as it would be totally impractical for someone to select their name from a list.

So, the most common types of input are "text", "checkbox" and "radio".

="firstname">
<br>

Then just type in what you want to appear next to the second form. For example, Last Name. The second form will appear directly below the first form.

<form>
First Name:
<input type="text" name="firstname">
<br>
Last Name:

Next step is to state the input type. Which will of course be text. Note that text includes numbers aswell, so someone can type in their telephone number.

<form>
First Name:
<input type="text" name="firstname">
<br>
Last Name:
<input type="text" name="lastname">

Again, the name attribute is just what you want the form to be called, pretty obvious really.

You can carry on adding how many forms you want, but you finish it in the traditional way, </form> This is what the two forms should be coded like.

<form>
First Name:
<input type="text" name="firstname">
<br>
Last Name:
<input type="text" name="lastname">
</form>

For a telephone number and postcode...

<form>
Telephone Number
<input type="text" name="telephone number">
<br>
Postcode
<input type="text" name="postcode">
</form>

This is what it should look like when using the "checkbox" and "radio" input types.

You would use a "checkbox" so that someone can select from a series of options. Different pets is a good example.

<form>
Dog
<input type="checkbox" name="dog">
<br>
Cat
<input type="checkbox" name="cat">
<br>
Snake
<input type="checkbox" name="snake">
<br>
Camel
<input type="checkbox" name="camel">
<br>
Iguana
<input type="checkbox" name="iguana">
</form>

For a "radio" input type it is basically the same principal, someone can select from a variety of different options. However, they can only select one of the options. This could be used for someone to select their age or someone elses.

<form>
20-29 years old
<input type="radio" name="age group 1">
<br>
30-39 years old
<input type="radio" name="age group 2">
<br>
40-49 years old
<input type="radio" name="age group 3">
</form>

Forms are incredibly useful and can really benefit your site, but if you want someone to submit their details then you need to have a submit button. When they submit it, the content is basically sent to another file where it is collected.

<form name="submit" action="test_1.asp" method="get">

The above is the html coding that allows someone to submit their details. Just punch it in before the "input type" etc. The "action" attribute is basically where the data is sent to, so the data will be sent to test_1.asp.

Below is the coding that you put in after the "input type" etc.

<input type="submit" value="Submit">

So if you wanted someone to submit their desired Nickname then this is what you would type.

<form>
<form name="submit" action="test_1.asp" method="get">
Nickname:
<input type="text" name="nickname">
<input type="submit" value="Submit">
</form>

That's it!

Just a quick re-cap then...

=Start your form using the <form> tag=
=Choose the "input type" that suits your form best. Should it be "text" for names, telephone numbers etc., "checkbox" for someone to tick different options or "radio" for someone to only select one option, but from a variety of choices=
=You can have lots of different forms below each other by using the <br tag, use it more than once if you want a larger gap between each form=
=Finish with </form>=

I hope this has increased your html knowledge or even managed to make your "not so good website" into a better one, making you a millions.
Wed 22/11/06 at 23:43
Regular
"It goes so quickly"
Posts: 4,083
oh nuts, pipped to the post by 60 minutes :)

Nice little guide there gRoZzEr :)
Wed 22/11/06 at 22:30
Regular
"all good things..."
Posts: 25
Here are just some pointers on how to put forms on your website using html.

Firstly, a form is defined by a <form> tag. Ingenious

Then there is the wonderful <input> tag.

There are many different types of input to suit different forms. For example, if you wanted someone to type in their name or address then the input type you would use would be "text".

If you wanted someone to select their gender then you would use a "checkbox" or "radio" input type, becuase you want them to select from a set number of options. You wouldn't use any of these inout types for the scenario above as it would be totally impractical for someone to select their name from a list.

So, the most common types of input are "text", "checkbox" and "radio".

="firstname">
<br>

Then just type in what you want to appear next to the second form. For example, Last Name. The second form will appear directly below the first form.

<form>
First Name:
<input type="text" name="firstname">
<br>
Last Name:

Next step is to state the input type. Which will of course be text. Note that text includes numbers aswell, so someone can type in their telephone number.

<form>
First Name:
<input type="text" name="firstname">
<br>
Last Name:
<input type="text" name="lastname">

Again, the name attribute is just what you want the form to be called, pretty obvious really.

You can carry on adding how many forms you want, but you finish it in the traditional way, </form> This is what the two forms should be coded like.

<form>
First Name:
<input type="text" name="firstname">
<br>
Last Name:
<input type="text" name="lastname">
</form>

For a telephone number and postcode...

<form>
Telephone Number
<input type="text" name="telephone number">
<br>
Postcode
<input type="text" name="postcode">
</form>

This is what it should look like when using the "checkbox" and "radio" input types.

You would use a "checkbox" so that someone can select from a series of options. Different pets is a good example.

<form>
Dog
<input type="checkbox" name="dog">
<br>
Cat
<input type="checkbox" name="cat">
<br>
Snake
<input type="checkbox" name="snake">
<br>
Camel
<input type="checkbox" name="camel">
<br>
Iguana
<input type="checkbox" name="iguana">
</form>

For a "radio" input type it is basically the same principal, someone can select from a variety of different options. However, they can only select one of the options. This could be used for someone to select their age or someone elses.

<form>
20-29 years old
<input type="radio" name="age group 1">
<br>
30-39 years old
<input type="radio" name="age group 2">
<br>
40-49 years old
<input type="radio" name="age group 3">
</form>

Forms are incredibly useful and can really benefit your site, but if you want someone to submit their details then you need to have a submit button. When they submit it, the content is basically sent to another file where it is collected.

<form name="submit" action="test_1.asp" method="get">

The above is the html coding that allows someone to submit their details. Just punch it in before the "input type" etc. The "action" attribute is basically where the data is sent to, so the data will be sent to test_1.asp.

Below is the coding that you put in after the "input type" etc.

<input type="submit" value="Submit">

So if you wanted someone to submit their desired Nickname then this is what you would type.

<form>
<form name="submit" action="test_1.asp" method="get">
Nickname:
<input type="text" name="nickname">
<input type="submit" value="Submit">
</form>

That's it!

Just a quick re-cap then...

=Start your form using the <form> tag=
=Choose the "input type" that suits your form best. Should it be "text" for names, telephone numbers etc., "checkbox" for someone to tick different options or "radio" for someone to only select one option, but from a variety of choices=
=You can have lots of different forms below each other by using the <br tag, use it more than once if you want a larger gap between each form=
=Finish with </form>=

I hope this has increased your html knowledge or even managed to make your "not so good website" into a better one, making you a millions.

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Impressive control panel
I have to say that I'm impressed with the features available having logged on... Loads of info - excellent.
Phil
LOVE it....
You have made it so easy to build & host a website!!!
Gemma

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre
Feedback Close Feedback

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.