1
00:00:02,420 --> 00:00:06,950
So, what exactly are web forms?

2
00:00:06,950 --> 00:00:08,042
Well, first of all,

3
00:00:08,042 --> 00:00:10,188
this is not a fixed term,

4
00:00:10,188 --> 00:00:12,905
it simply is a term I use here

5
00:00:12,905 --> 00:00:17,905
to describe a collection of HTML elements,

6
00:00:18,270 --> 00:00:21,086
which we use to display forms,

7
00:00:21,086 --> 00:00:26,070
input forms to visitors of our website.

8
00:00:26,070 --> 00:00:30,390
And as I already mentioned in the last course lecture,

9
00:00:30,390 --> 00:00:32,323
in the introduction of this module,

10
00:00:32,323 --> 00:00:35,770
you can build all kinds of forms depending

11
00:00:35,770 --> 00:00:37,900
on which website you're building.

12
00:00:37,900 --> 00:00:41,502
But in general, most or at least many websites

13
00:00:41,502 --> 00:00:43,571
are not just about presenting

14
00:00:43,571 --> 00:00:45,279
or showing content,

15
00:00:45,279 --> 00:00:48,445
which is what we did up to this point in this course.

16
00:00:48,445 --> 00:00:53,445
We always just showed text or showed images.

17
00:00:53,446 --> 00:00:58,250
But, most web pages are not just about that,

18
00:00:58,250 --> 00:01:00,570
though it is of course super important,

19
00:01:00,570 --> 00:01:04,364
but they also are about fetching user input.

20
00:01:04,364 --> 00:01:08,650
And now here, it really depends on what you're building.

21
00:01:08,650 --> 00:01:11,357
You could have a contact form.

22
00:01:11,357 --> 00:01:15,173
For example, if you have a portfolio website,

23
00:01:15,173 --> 00:01:18,716
you could have a contact form where other people

24
00:01:18,716 --> 00:01:23,490
can contact you to book your services, for example.

25
00:01:23,490 --> 00:01:26,120
You can have checkout forms,

26
00:01:26,120 --> 00:01:28,730
for example, on Amazon.com,

27
00:01:28,730 --> 00:01:33,561
where you enter your address and your credit card details.

28
00:01:33,561 --> 00:01:37,140
You can have a website where users need to log in,

29
00:01:37,140 --> 00:01:39,405
and therefore, you might have a login form

30
00:01:39,405 --> 00:01:43,696
that allows users to sign up and log in.

31
00:01:43,696 --> 00:01:46,240
You could be building a blog

32
00:01:46,240 --> 00:01:50,740
where users can comment and share feedback in some way.

33
00:01:50,740 --> 00:01:54,560
So then you might have a comment or feedback form.

34
00:01:54,560 --> 00:01:55,393
And of course,

35
00:01:55,393 --> 00:01:56,810
there are many other kinds

36
00:01:56,810 --> 00:01:59,520
of forums you could have on your website.

37
00:01:59,520 --> 00:02:03,416
In the end, it's simply about fetching some user data

38
00:02:03,416 --> 00:02:05,530
for whatever purpose,

39
00:02:05,530 --> 00:02:06,851
because you wanna ship some goods

40
00:02:06,851 --> 00:02:09,630
to them because you're interested

41
00:02:09,630 --> 00:02:12,200
in their thoughts and feedbacks,

42
00:02:12,200 --> 00:02:15,341
or because you may be wanna contact them back

43
00:02:15,341 --> 00:02:19,260
to start a business relation with them.

44
00:02:19,260 --> 00:02:21,580
That's what forms are about.

45
00:02:21,580 --> 00:02:24,040
And for building such forms,

46
00:02:24,040 --> 00:02:26,280
for fetching that user input,

47
00:02:26,280 --> 00:02:30,570
we've got a broad variety of HTML elements

48
00:02:30,570 --> 00:02:32,471
and configuration options

49
00:02:32,471 --> 00:02:35,310
that allow us as a web developer

50
00:02:35,310 --> 00:02:37,730
to build those forms.

51
00:02:37,730 --> 00:02:41,813
Now, as you will learn throughout this course section,

52
00:02:41,813 --> 00:02:46,813
building the form and adding those elements is one thing.

53
00:02:46,870 --> 00:02:49,950
There also are a couple of related concepts

54
00:02:49,950 --> 00:02:52,160
which we'll have a closer look at.

55
00:02:52,160 --> 00:02:55,039
For example, we can validate user input.

56
00:02:55,039 --> 00:03:00,039
So we can force users to enter certain input values

57
00:03:00,079 --> 00:03:03,050
and tell them that something is incorrect

58
00:03:03,050 --> 00:03:05,040
if they entered something else.

59
00:03:05,040 --> 00:03:07,520
A good example would be an email address,

60
00:03:07,520 --> 00:03:10,580
which needs to be a valid email address.

61
00:03:10,580 --> 00:03:12,380
Otherwise, we show an error.

62
00:03:12,380 --> 00:03:14,720
And last but not least,

63
00:03:14,720 --> 00:03:16,296
once all the data is entered,

64
00:03:16,296 --> 00:03:19,450
it also is important that we do something

65
00:03:19,450 --> 00:03:22,432
with that data once the form is submitted,

66
00:03:22,432 --> 00:03:24,950
typically when a button is clicked.

67
00:03:24,950 --> 00:03:26,969
And that is also something we are going

68
00:03:26,969 --> 00:03:30,603
to discuss throughout this course section.

