Generating node title from node fields So, this is a newbie question. I'm using Automatic Nodetitles with a custom content type. I'd like the node's title to be equivalent to one of my fields. After some snooping around I came up with this:

&lt;?php return $node-&gt;field_my_field ?&gt;


I put this in the "Pattern for the title" field, but this just returns 'Array'. So, it must be an array. However, I'm not having any luck figuring out how to index it to get the value I'm looking for. Everything I tried just gives me 'Undefined offset' errors.

This can't be too hard.... Thanks!
I think it's better idea to use token instead of php code for this simple replacement.

When you have the token module installed you'll have a list with available tokens under the Pattern for the title: input box. And if your field is named *field_my_field* then you'll have the tokens

[field_my_field-formatted]
[field_my_field-raw]


or something like that to choose from.