51 Posts
morhinio
7 years ago
Topic

Hello,

is it possible to get all options (only values) from a multiple select?

My multiple select field:

TEXT_1=1

TEXT_2=2

TEXT_1=3

I have tried the following in the template:

$cck->get('field_name')->options

But than I get only this one:

TEXT_1=1||TEXT_2=2||TEXT_3=3

I want only the values, like 1,2,3. Is there an option?

Get a VIP membership
4229 Posts
Kadministrator
7 years ago
1
Level 1

Hi,

 you could use some regex to extract values from string. Or try to look into JCckDev and JCcckContent classes if there is any function to help with that

51 Posts
morhinio
7 years ago
0
Level 2

Thanks, the regex was a good tip.

Get a Book for SEBLOD