Page 1 of 1

get values from a multiselect field

Posted: Mon Aug 18, 2025 12:12 pm
by janvl
Hi,

i have took over a companydirectory and rebuild it to lise.

There are some fields defined as multiselect (german "Mehrfachauswahl" ) i need to get these values in a new template.
I have found how to do that with categories, that is working.
However i cannot find how to do this with a multiselect-field, searched the forum and the internet but i did not find it.

The field has two values, like "javaprogrammer" and "perl-programmer" and one can select one or both.
If it is complex to get the values, i will make a common select-field and offer the three possibilities.

Regards,
Jan

Re: get values from a multiselect field

Posted: Tue Aug 19, 2025 9:57 am
by webform
Do you mean to display the selected values in a detail template?

If you have a multi-select field in LISE, the selected values will be displayed as javaprogrammer,perl-programmer when you call your multi-select field: {$item->fieldalias}.

If there should be space between the values in the output, you can do {$item->fieldalias|replace:",":", "}

Re: get values from a multiselect field

Posted: Tue Aug 19, 2025 10:31 am
by janvl
Thanks webform,

i have thought too complex!
Forgot to first try the obvious . . . . !

When you ask KI it even gets more complicated.

Regards,
Jan