From the course: Building Great Forms with HTML and CSS

Unlock the full course today

Join today to access over 24,400 courses taught by industry experts.

Handling payment, part 3

Handling payment, part 3

- [Instructor] On our payment form, we just have a few more things that we want to do. The next item that we're going to take care of, is we are offering our user the ability to pay via credit card or by PayPal. So, when we click the radio button, what we want to have happen, is we want that credit card information to disappear if PayPal is selected. And if credit card is selected, we want to hide the PayPal information. So we'll accomplish this by using some JavaScript. I'm going to go into my code snippet file, for this particular video, and I'll scroll down a little bit. And the first thing we can do, is we can go ahead and add our JavaScript code. So down at the bottom we have some JavaScript snippets. We're going to select this very first one and copy it. I'll go into my payment file, and let's scroll down to the bottom where we have our JavaScript. Again, I'm still in the document ready and I'm just going to…

Contents