Current section: Forms 59 exercises
Problem

Submission

Loading exercise

Transcript

00:00 All right, so we've got a couple of problems. For one, if I type in a password, I like Twix. Oh, I just said my password. But you'll notice we do get the password deserialized. The server generated this, so that's expected. Servers should be able to see the password. However, that password is in the URL, because that's just how that works.

00:19 The URL is where all of our data is submitted to. That's just the default behavior of the web. But when you submit forms, you probably don't see your password in the URL. That would not be a good thing. Logs, it will show up in your logs. It will show up on your screen. So if somebody's watching behind you, they'll be able to see that. All sorts of problems there.

00:37 So we don't wanna put stuff in the URL. In addition, the photo, if we select a photo, we're just sending the name of the photo, of the image. But yeah, that is not going to work. We need to send all the binary data in there as well. So we've got two problems with the default behavior

00:56 of this form, so we need to configure the form a little bit differently. In addition, I don't like the full page refresh. You'll notice every time we're getting a refresh when I submit this form. This is something I do not want either. And so your job is to fix both of these problems. And in this exercise, you're going to be adding each one of these props to the form.

01:16 And you just add them each in turn. And I want you to add one, then check how it changes the behavior, and then add another, check how it changes behavior, so on and so forth. And you're not only gonna be working in the UI, but you're actually also gonna be making some changes in our API file as well.

01:34 It's just so you see how changes to the UI are going to impact the backend a bit. And then finally, when we get to this on-submit handler and preventing default, sorry, spoiler alert here, but I promise that you'll learn this stuff anyway. But then this actually makes the rest of this stuff unnecessary, but we'll get to that here in a little bit.

01:56 Yeah, just have a good time with this, and we'll see you when you're finished.