This project is not covered by Drupal’s security advisory policy.

Dynamic Field is a CCK field that returns a textarea where you can enter custom PHP code. The code is computed real-time and lets you access Drupal objects like $node, $user...

This is not a duplicate of ComputedField! ComputedField computes and saves the value in the database when the node is created but Dynamic Field doesn't store the computed computes the php whenever the node is rendered in the theme.

All you need to do is place the PHP directly into the CCK field without the <? ?> tag.

Below is an example to return the Node ID:

        $nid = $node->nid;
        return $nid;

Another example to return the Content Type:

        $ntype = $node->type;
        return $ntype;


This project is sponsored by SourceN. We provide specialist consulting services in Enterprise Drupal, Views & Panels, Visit us at or Contact us.

Project Information