k2 custom field retrive text of list

1 year 10 months ago - 1 year 7 months ago #1 by Cline
k2 custom field retrive text of list was created by Cline
hello i use this to display a custom k2 field
foreach ($fields as $field) {
   if ($field->id == '14'){
     $pays = $field->value;
   }
}
it works cool for text field but not for select field because it load number of value not text
did you have an idea for this ?
regards

Please Log in or Create an account to join the conversation.

1 year 10 months ago #2 by Christopher Mavros
Replied by Christopher Mavros on topic k2 custom field retrive text of list
Hi again!

You may try to write
var_dump($field);

and see if the $field variable contains more information, like a $field->label or something similar.

Thanks again.

Christopher Mavros
mavrosxristoforos@gmail.com
If you like our extensions, please rate us on the JED!

Please Log in or Create an account to join the conversation.

1 year 10 months ago #3 by Cline
Replied by Cline on topic k2 custom field retrive text of list
yes i already done this ... it return anly value not text .. it hink i need to check more
thanks

Please Log in or Create an account to join the conversation.

Moderators: Christopher Mavros