Current section: Inputs 59 exercises
solution

Hidden Inputs

Loading solution

Transcript

00:00 All righty here, so let's add an input type is hidden and the name is org ID and the value is 1 2 3 this When you're building a dynamic application this could absolutely be a dynamic value that's based on some state or something like that But we're just going to hard code it here

00:17 For our purposes of exploring this API so if I pop this open hit submit then we should see our org ID Shows up right there, even though the user won't actually be able to see that that value you can of course also see it if we look at our

00:34 Divs and all this stuff right there. There it is. That type is hidden and it also is a Something that you can interact with the DOM as well So we can say dot value and you can change the value and whatever Except you need to have proper syntax if you want that to work

00:52 But yeah, so it is a proper input the user just can't see it on the page and Assisted technologies won't read it to users either. So it's useful for Having a value you want submitted along with the rest of the data without Making the user have to see or worry about it at all