164 Posts
redback
9 years ago
Topic

Hello,

have an simple select field with the values:

0=BMW
1=Mercedes
2=Audi

In the Content-View I m getting the Output "0" instead of "BMW". The Form show instead correctly "BMW".

Any Idea?

Best Chris

Get a VIP membership
572 Posts
_jrmo
9 years ago
1
Level 1

Hi there,

Is it because you're using $cck->getValue('field_name'); to render the field? If so, use $cck->getText('field_name'); instead. Alternatively if you are using the HTML typography on the field and using *value*, you can use *text* instead.

Cheers,

James

164 Posts
redback
9 years ago
0
Level 2

Hey James,

thanks for you input. I know the different calling procedure, but the error was more basic. I found out, when i looked to the array "print_r($fields) and die;". OMG it was just the definition.

WRONG 

0=BMW
1=Mercedes
2=Audi

CORRECT

BMW=0
Mercedes=1 
Audi=2


Best Chris

Get a Book for SEBLOD