k2 custom field retrive text of list

  • Cline
  • Cline's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 7 months ago - 6 years 4 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
Code:
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
Last edit: 6 years 4 months ago by Christopher Mavros.

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

  • Christopher Mavros
  • Christopher Mavros's Avatar
  • Offline
  • Administrator
  • Administrator
More
6 years 7 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
Code:
var_dump($field);

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

Thanks again.

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

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

  • Cline
  • Cline's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 7 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