Forms

You will understand Forms
1. The tags related to Forms
2. Attributes that are related to the tags
3. The meaning of "Id" 
4. The meaning of "name"
5. How to create your own forms.
1 / 19
next
Slide 1: Slide
IT Service deliveryFurther Education (Key Stage 5)

This lesson contains 19 slides, with interactive quiz and text slides.

Items in this lesson

You will understand Forms
1. The tags related to Forms
2. Attributes that are related to the tags
3. The meaning of "Id" 
4. The meaning of "name"
5. How to create your own forms.

Slide 1 - Slide

Example of a form
<form action="/action_page.php">
  <label for="fname">First name:</label><br>
  <input type="text" id="fname" name="fname" value="John"><br>
  <label for="lname">Last name:</label><br>
  <input type="text" id="lname" name="lname" value="Doe"><br><br>
  <input type="submit" value="Submit">
</form> 

Slide 2 - Slide

The Form Tag 
<form action="/action_page.php"> 
</form> 
"Here the form tag has one attribute called "actions"
This is what happens to the form when it is submitted".
The form gets saved in a file "action_page.php"

Slide 3 - Slide

Exercise one
Complete the exercise on the next slide to save the form to 
test\ex1.php

Slide 4 - Slide

Slide 5 - Link

Input Text box
<form action="/action_page.php">
  <input type="text" id="fname" name="fname" value="John"><br>
</form> 
"Here the form works with an input tag."
Inspect the different attributes  associated with the "Input" tag.

Run the code in the next slide 

Slide 6 - Slide

Input Text box
<form action="/action_page.php">
  <input type="text" id="fname" name="fname" value="John"><br>
</form> 
"Here the form works with an input tag."
Inspect the different attributes  associated with the "Input" tag.

Run the code in the next slide 

Slide 7 - Slide

Slide 8 - Link

<input type="text" id="fname" name="fname" value="John"><br>

How many attributes are there in the "input" tag?
A
1
B
4
C
2
D
5

Slide 9 - Quiz

<input type="text" id="fname" name="fname" value="John"><br>
The attributes in the input text box
The Type ---- Type of input tag i.e "text"
id---- This associates the "Text" box with a label
Name------ the name given value that is passed from the text box
Value---- this is the value that is  pre-populated in the text box

Slide 10 - Slide

Create a second text box  with the folllowing:
Create second input box with the following:
type  text
id= lname
name=lname
value=Hamza

Slide 11 - Slide

Slide 12 - Link

  <input type="submit" value="Submit">
The input type is "Submit"
This has two attributes
1. type
2. value

Slide 13 - Slide

The Label 
<form action="/action_page.php">
  <label for="fname">First name:</label><br>
  <input type="text" id="fname" name="fname" value="John"><br>
  <input type="submit" value="Submit">
</form> 
Here the label is assiociated the input  type by id

Slide 14 - Slide

Slide 15 - Link

Have go at forms now

Slide 16 - Slide

What you must do!
Create a form for your clients interested in either a web site or employment.
Suggestion is do the form in a div tag below your existing code and use the "id" to link it from your menu.

Slide 17 - Slide

Thank you
Thank you for learning with us.
Keep practising 

Slide 18 - Slide

The End

Slide 19 - Slide