From the course: JavaScript: Web Form Programming

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Dynamic field display

Dynamic field display

From the course: JavaScript: Web Form Programming

Start my 1-month free trial

Dynamic field display

- [Instructor] In this chapter, we're going to see how to control the display and behavior of form fields and even complete forms themselves. That's a fairly common scenario in form development to have to change how form controls are displayed in the form, depending on a set of criteria. And that's where we're going to start. So I've got the dynamic display finished version up here in my browser, and there are a few different techniques that we want to demonstrate in this example. So the first is going to be this search field that you can see expands and contracts when it has the focus, right? And so there's a little nice animation effect on it. So that's the first example. Next is a login section where I can enter a username and password, and you can see, I can use this checkbox to dynamically might show and hide the password. And then the last example is we've got this set of check boxes down here, and we can control the…

Contents