Form Drop Down Menu
Hey buddy, this video is going to be about dropdown menus. Okay. We've got to pick one. Get started with one. It's very exciting. The short version is basically it's a tag called select. Ok. And you have the option values and that's what builds your dropdown menu at the end of this, we'll throw in a couple of input types because we're not going to go through every single one ever created because it would be very long videos. But quickly look at the date picker and a color picker because that's kind of exciting. We can get it to work. You go pick a nice color. Alright, let's work out how to do the drop down menu. It's not hard. Let's jump in now and work out how to do it. All right. I'm gonna put it inside my relative input wrapper. Made it way too long. Type it in every time. Okay, so it is called select. It's weird not drop down. Okay, it's not an input value. Like most of the rest of them it's called select. Give it a name and I. D. This is like a generic name for the whole thing. Ca...
me mine is going to be the county that you're in. Okay. Different counties in Ireland. Okay. County even and I'm going to use the same name for the I. D. Cool. Now inside of this are the values for the dropdown menu. These are court options. Okay, so options, give it a value. This is what's going to come to you in the email. Okay. So the value for this one is going to be limerick. that's where I'm moving. Okay. And this is in the little space here is what the user is going to see. Okay, we're going to have a couple of them. Alright, jump there because I was trying to use my shortcut got the wrong one. So I'm duplicating the line that I have my cursor selected on by holding down the shift and the option key on a Mac and using the down arrow on a pc. It is shift and salt and use the down arrow. Okay, So I've got these these two command D to get both of them because I'm going to use the same name. Okay, I'm gonna put in galway. I'm just randomly picking in places that our road bikes can go. Probably need one for Dublin as well. County Dublin. All right. Alright. Those are our dropdowns. Let's have a little look. There we go. Okay, so very often so these are the ones right? That's cool. Very often though you won't have like the first one pre filled in. You'll have an option here. Okay, you can duplicate up as well. Okay, we're using the same same to shortcut but using the up error that is shift option on a Mac control shift assault on a pc. Okay, I'm going to give this one a value of not chosen chosen, chosen chosen. Oh dear. Um And over here I'm going to use this one as choose county. Okay. And the reason I've got not chosen is because that one because it's the first one is going to be the default and if they don't pick anything okay it's gonna close it down instead of saving. Okay let's open it back up. Having a good day. It's preview in the browser. You might have to close this, open it back up again. Let's have a little look. So he says the first one so let's choose and choose county. Okay and if they leave it on this, I don't want to value coming back up choose county. I want a value to me to come back in of. They didn't pick anything. Okay so nothing selected or something like that. If I can find it. Where are you? Cool you can pre fill things in. Okay so you wanted to start with galway? You don't want to use this option here. Just kind of have a default one you can in here after the quotation marks just say selected. Okay and that can be the one that gets picked first and they can go and change it from that. Let's check it out, reset it. Okay let's pick, go away. I love galway. Alright drop down menus now. We could I could go on forever with all the different options so what you can do though is like there's loads more. Okay I'm just gonna quickly skim them. So the ones that I use whatever I could date real quick. I'm not going to fill in all the data because some of them don't need much. Okay you just use them without doing anything but I guess I just want to give you a quick idea of the ones that you're likely to run into. Date ones handy whereas date time. Okay let's save it let's have a little look. So date time. Okay they can pick a date and time thing. Okay they can pick a color. Okay I'm not sure when they'll be picking a color and I have no idea whether it's even as what fear was that one date time date? I don't know what that one is. It must need more values But there are lots more. The best place to go and have a look is the W three schools place. So W three schools form. So never getting this site. In terms of forms I find I start with clicking this button here and say okay I want stuff about html. Okay. And then having a look down the side here, there's a bunch of different kind of like subgroups in this case forms. Okay you can start at the top, it kind of gives you general form structure then it gives you the different elements that go inside of it input types you can see there and they'll go through and explain them and how the syntax works. Not in my lovely kiwi accent. Just all written on plain text but we can't go through every single one of them but you get the idea of most of it right. Things like names, values, I D s are all important. We've worked on labels, I think you have enough now to go off and be able to kind of implement all these other input types. Alright buddy, that is it for forms, we're going to get into styling the form because our form is hideous. Look at art form, where is he at him at him? They're all the same. Okay, not beautiful. Gay. We need to style these and make the form part look a bit nicer. I'll see you in the next video. We'll go and do that.