Articles Anywhere

get values from repeatable fields

4 months 1 week ago #89534

TVBZ's Avatar TVBZ

Hello,

I have a custom field type repeatable field called "educations".
This field(group) has 3 (sub)fields: education, institute, year.

When i call [educations], the result is a list with a list item for each education.
The 3 fields are comma separated inside the list item.

I want to show these results in a grid or table.
How to get these 3 individual (sub)field values in articles anywhere?

I would expect something like [repeatablefield.subfield], for example: [educations.year].
I can't find it in documentation? Please advise.


Thanks

4 months 1 week ago #89535

Peter van Westen's Avatar Peter van Westen Admin

There is no advanced support like that for repeatable fields in Articles Anywhere.

4 months 1 week ago #89541

TVBZ's Avatar TVBZ

Huh.. That's a bit disapointing. 😡
Is there any plans for this in the future?

Can you recommend another solution?
Maybe you have a code example using sourcerer?


Thanks

4 months 1 week ago #89543

Peter van Westen's Avatar Peter van Westen Admin

The repeatable field will disappear in Joomla 4 and will be replaced with the new Subfields.
There are no plans to improve the support for the current Repeatable field.

You would have to fall back on custom PHP coding for this. Or see if you can do what you want with custom layout overrides.

4 months 1 week ago #89544

TVBZ's Avatar TVBZ

Ok. I only have 1 repeatable field. So there is only 1 layout.
I created a template override for the repeatable fields plugin.

Now I have what I need. Thanks. 🙂