215 Posts
cubist
10 years ago
2
Topic

I am rendering a field with the following: 

$cck->get('trf_route')->value

The trf_route field is a select box for the 50 US states.

Set as:

Alabama=AL

Alaska=AK

etc

etc

.....

When the field renders in the template, it shows "Alabama", not "AL" (which is what is stored in the dB) ... how can I get AL when I render in my templates?

Thx!

Get a VIP membership
85 Posts
Jpeg
10 years ago
1
Level 1

Hi Cubist,

try $cck->get('trf_route')->text

never forget todo a dump of the object you can see a lot of tricks.

Best Regards

Jpeg

693 Posts
rpoy
10 years ago
0
Level 2

Hi,

Getting Field Values is also a good reference...

thanks,

Randy

Get a VIP membership