Ajax

How to enable Ajax for CCK Fields in Drupal 7

The idea is to modify another CCK field based on selection of an item via a select list in another field.

Let us consider a content type called article containing 2 additional fields: article_test_entity - which is an entity reference that displays node titles of all nodes and article_test_entity_type - which is a select list that contains Content Type names list with its key as the actual machine name of the content type. The idea is to restrict the list of node titles displayed on article_test_entity based on the content type selected via article_test_entity_type.

<?php

/*