2

Your approach will still work, but you just need to pass a contact object as the second parameter to your call $fields = FieldsHelper::getFields(...); Unfortunately afaik there is no API around contact the way there is around user, so it's a bit more complex to get it. I got it by doing a database query (as in Selecting data using JDatabase) to find the #...


1

Create an override of com_fields/layouts/fields/render.php. Find this line: $content = FieldsHelper::render($context, 'field.' . $layout, array('field' => $field)); Change it to also pass the item to field layout: $content = FieldsHelper::render($context, 'field.' . $layout, array('field' => $field, 'item' => $item)); The item with its fields is ...


1

$fields['programs'] is already an object. Run json_decode() only on its value. $programFields = json_decode($fields['programs']->rawvalue);


1

Rename actiecode.php to actiecodes.php. Class name, filename and field type in XML form must all match.


Only top voted, non community-wiki answers of a minimum length are eligible