Im using drupal 7 and created a content type abc. In abc there is a CCK field called seller. When a logged in user create a new item for content type abc, the value of the seller field would be the name of the person who is logged in. So what I want is a default value for the sellers fiels or you can say that a small piece of php code. But I am not able to find the place for the php code to enter in drupal 7. In drupal 6 there is text area for the php code to enter. But how can this be done with the drupal 7. Any ideas?
This functionality is not part of the Field UI in Drupal 7. You'll need to install the CCK module.
(I assume Drupal 7)
May be a bit late answer ...
As @Nikit said, you have to enable the PHP filter module.
But also, beware of a trap that cost me some time : you will have to set permissions to admin for this module as default permissions are empty (may be because this module is rather on the dev side, so even admin should not have this permission by default ?).
Then, in the visibility settings for pages, you will have a third options (radio button) that allows you to add PHP for :
Pages on which this PHP code returns TRUE (experts only)
PS : i don't get the answer from Dylan as CCK was mostly incorporated to D7 core...
I'm using Drupal 7. I had also same issue.
Even though most of CCK has moved to core in the Drupal 7 version, we cant see the option to include PHP code / PHP function until you install cck module.
After installing this module only, we can see the options to include PHP function.
I have created select list to display city data. For this i have used one function to fetch all city data from my custom table.
For more details see this image : (city_list_from_maxmind - PHP function)