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
volgende
Slide 1: Tekstslide
IT Service deliveryFurther Education (Key Stage 5)

In deze les zitten 19 slides, met interactieve quiz en tekstslides.

Onderdelen in deze les

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 - Tekstslide

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 - Tekstslide

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 - Tekstslide

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

Slide 4 - Tekstslide

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 - Tekstslide

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 - Tekstslide

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 - Quizvraag

<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 - Tekstslide

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 - Tekstslide

Slide 12 - Link

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

Slide 13 - Tekstslide

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 - Tekstslide

Slide 15 - Link

Have go at forms now

Slide 16 - Tekstslide

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 - Tekstslide

Thank you
Thank you for learning with us.
Keep practising 

Slide 18 - Tekstslide

The End

Slide 19 - Tekstslide