Check your version

This video covers a topic in Drupal 7 which may or may not be the version you're using. We're keeping this tutorial online as a courtesy to users of Drupal 7, but we consider it archived.

Alternate resources: 

JavaScript form dependencies with the States System

Video loading...

Join Drupalize.Me to watch this video

Join today and gain instant access to our entire video library.

Log in Sign up
  • 0:15
    In this chapter, we're going to show the JavaScript States
  • 0:18
    System which works with Drupal's Form API
  • 0:22
    to allow some JavaScript behavior to happen
  • 0:25
    without actually having to write any JavaScript of your own.
  • 0:29
    We can see some examples of this happening.
  • 0:31
    If we go to just the Node Edit page in Drupal 7 and scroll down,
  • 0:38
    you can see some things like this.
  • 0:39
    When you click on the menu settings' Provide a menu link checkbox,
  • 0:45
    you can see that the fields next to it
  • 0:49
    either show or hide by just clicking that checkbox

Javascript Form Dependencies with the States System

Loading...

Create dependencies between form elements so that you can show/hide or disable/enable one form setting based upon the form state of another from setting.

Additional resources:
There are no resources for this video. If you believe there should be, please contact us.