Building Data-Driven Web Apps with Pyramid and SQLAlchemy Transcripts
Chapter: User input and HTML forms
Lecture: Registration form
0:00 I don't know how you feel about it
0:01 but this form doesn't seem super-useful to me.
0:03 Let's go ahead and implement this really quickly.
0:05 We'll not do too much design
0:06 but we'll just throw some quick stuff together here.
0:09 So the other thing we need here is the method
0:12 to be POST, and then we need a couple of things in here.
0:16 So let's have an input, the type is text
0:18 placeholder is going to be your email address.
0:25 And it also needs a name
0:26 and I'll put that right at the beginning.
0:28 This tells the browser what to call the value
0:32 and gives us a name to retrieve the value by.
0:34 So this will be email.
0:36 And this will be password.
0:39 And let's do also a name, name name.
0:46 So your name, your email address, and password.
0:51 And on this one of course we'll want the type also
0:53 to be password.
0:55 Now a lot of forms have password and confirm password.
0:58 I'm not a big fan of that
0:59 because if long as you add the ability
1:01 to reset your password
1:03 if for some reason in that super-odd case
1:05 that you actually register
1:06 and then immediately forget your password
1:08 or more likely screw up the password
1:10 just go reset it.
1:11 That's the way I would do it.
1:12 I would not have a confirm
1:13 but that's, you know, whatever makes sense for you.
1:15 And then of course you want to have a button
1:17 and the type is going to be submit.
1:19 And the value is going to be register.
1:22 Let's see where we are.
1:23 That looks amazing, doesn't it?
1:24 What do you think, just leave it like this?
1:26 Probably not, maybe we need a really quick bit of design.