Page 1 of 1

LISE: Inhoud Text Area ophalen

Posted: Sun Jan 03, 2021 12:04 pm
by Robert
Ik ben sinds een paar dagen bezig met de LISE module.
Waar ik tegen aan loop is dat het me niet lukt om de inhoud van een Text Area op te vragen.

Ik heb allerlei varianten van onderstaande geprobeerd, maar ik kom er niet uit.

{assign var=foo value=$item->fielddefs.beschrijving.value}
{$foo}

of

{assign var=foo value=$item->fielddefs->beschrijving}
{$foo.value}

Tips over hoe ik dit zou moeten aanpakken?

Re: LISE: Inhoud Text Area ophalen

Posted: Sun Jan 03, 2021 12:24 pm
by Jo Morg
{$item->description} :)

Re: LISE: Inhoud Text Area ophalen

Posted: Sun Jan 03, 2021 1:21 pm
by Robert
@Jo Morg: I am not looking for the standard 'description'
I have added a Field Defintion called 'Beschrijving', alias 'beschrijving' of type Text Area to my 'Employee' LiseComponent.
My test Employees have this 'Beschrijving' filled with styled text.
However, I cannot figure out how to retrieve the content from the Beschrijving field.

Can you help me with an example or documentation?

I also have a Checkboxgroup with several 'capabilities' . I managed to loop over the values bij doing:
<ul role="list">
{assign var=caps value=","|explode:$item->fielddefs.caps.value}
{foreach from=$caps item=cap}<li>{$cap}</li>{/foreach}
</ul>
But a similar approach does not seem to work with the TextArea field.

Re: LISE: Inhoud Text Area ophalen

Posted: Sun Jan 03, 2021 2:05 pm
by Jo Morg
Any field value can be accessed via {$item-><field_alias>}. Their representation depends a bit on it's type, but field values are all stored as plain text.
so...

Code: Select all

{$item->beschrijving}

[solved] Re: LISE: Inhoud Text Area ophalen

Posted: Sun Jan 03, 2021 2:55 pm
by Robert
Thank you, thank you, thank you!

I spent hours finding the solution, when the problem was extremely simple...

I made a typo in the fielddefinition. I used 'beschrijiving'. Even now I find it very hard to spot the extra 'i' :o

Re: LISE: Inhoud Text Area ophalen

Posted: Sun Jan 03, 2021 2:58 pm
by Jo Morg
Glad I could help! Have a great New Year!