Last updated August 2, 2012. Created by Tamar Badichi-Levy on March 8, 2008.
Edited by Amir Simantov, aaronbauman, cleanthes, add1sun. Log in to edit this page.

This module has been abandoned in favor of the more widely used and more actively supported Conditional Fields module.

Overview

The Dependent Fields module is a framework that helps you create interactive forms form your site. It basically looks for any content fields in your form and if a content field is from type radio-button or a check box, you are able to choose any other field in your content type that will be shown/hidden depends on what the user has chosen.

Why is it helpful?

Let's say your users must fill a certain form with several fields that are logically related and you want your users to fill that form according to that logic. You are also afraid that the user will see how big is a form and may give up and choose another site that will have less options but is simpler to understand. These are are classic cases in which you might choose to void showing the users all form elements at once.

Installation Requirements

Drupal: 5.x or greater
PHP: 5.x or greater

Using the module instructions

You can use the module in two ways:

  1. Add a cck field to your content type. In the admin page of the content field you will be able to choose one value from the other selectable (check boxes/radio buttons) fields on your content type. You will also have the option to choose if you want this field to be shown directly after the selectable check box/radio button.
  2. Using hook_form_alter to add a specific suffix to your 'parent' field and 'child' fields that will tell the javascript all it needs to know.

Current limitations

  • This module is in final stages of development so please be cautious for bugs when using on production sites.
  • You can only determine the visibility of fields and not groups.
  • A field can depend only on one field's value.
  • Created by

    Tamar Badichi-Levy

    Maintainer

    Aaron Bauman, aaronbauman

    Credits

    Lior Kesos, liorkesos, who taught me Drupal magics and inspired me to contribute this module.

    Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.

    Comments

    This page needs to be updated. As said in the Dependent Fields project page: "This module has been abandoned in favor of the more widely used and more actively supported
    Conditional Fields".