As of May 31, 2023, we have updated our Code of Conduct.
4 votes

Get value from a repeatable field and use it in a module

The above answer from @Lodder is correct, but you will also need to wrap the function with if (!function_exists('yourFunctionname')) { // ... proceed to declare your function } If you do not, ...
NicholasByDesign's user avatar
4 votes
Accepted

Get value from a repeatable field and use it in a module

I was hoping someone would eventually ask this question on here. I wrote a function for my first usage of repeatable form fields and use it for every extension I make now. Here is how you do it: ...
Lodder's user avatar
  • 26.8k
3 votes

Layout override for repeatable subform custom field

This helped me to solve my problem... <?php $fieldX = json_decode($this->item->jcfields[X]->rawvalue, true); ?> where X is the Id of the subform native field A, B, C is the respective ...
Chinecherem Kalu's user avatar
3 votes

Need to dump specific table to excel

I recently answered a question regarding exporting the list of Joomla users to CSV - export user details from database via cron. The same code can be used for exporting data from any Joomla table. As ...
Insider Pro's user avatar
2 votes
Accepted

Get values of other custom fields in field layout override

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 ...
Sharky's user avatar
  • 9,936
2 votes
Accepted

How do I display the values from a subform

$repeatable_fields_map = (array)$this->params->get('repeatable_fields_map'); foreach($repeatable_fields_map as $item) { $accreditationImage = $item->accreditationImage; $...
Michael's user avatar
  • 593
1 vote
Accepted

What is the correct PHP to render Subform repeatable custom fields on the front end?

TLDR: You need to used FieldsHelper::render for that. Here are the code samples: fancysubform.php : the subform custom layout Place this file there: YOUR_JOOMLA_WEBSITE_ROOT/templates/cassiopeia/html/...
mralexandrelise's user avatar
1 vote
Accepted

Create dynamic html markup from values in repeatable field json

Since your logos and urls exist in pairs, you can use a single loop over the logos and access the urls via the shared index. Code: (Demo) foreach ($jsonPartenaires['logo'] as $i => $logo) { $...
mickmackusa's user avatar
  • 4,761
1 vote

Get linear array of subform repeated values

Since PHP 7 array_column() supports passing an array of objects. You would only need to cast the data to array: $ids = array_column((array) $this->params->get('ids'), 'id'); On older PHP ...
Sharky's user avatar
  • 9,936
1 vote

Get values of other custom fields in field layout override

Here's a backstop solution, for using if no-one comes up with a better idea. The basic approach is to use a plugin which is triggered by onContentPrepare. In this plugin it gets and processes the ...
Robbie Jackson's user avatar
1 vote
Accepted

Default value for repeatable custom field

So you would need to change it to be json and array based. Here is a rough example I setup as a default field which works as expected: {"test0":{"type":"2","Fichier":"images\/joomla_black.png","...
tonypartridge's user avatar
1 vote

Joomla 3.6 How to migrate data from repeatable to subform

I don't recommend you to process this data with an SQL query. Its not bulletproof and you don't have a tools to validate the data. Why? You would have to work strictly on strings that can lead to ...
Artur Stępień's user avatar
1 vote
Accepted

How to get repeatable form-field data?

You could group each set of field by the key. Call the parameter and convert to array: $social_links = $params->get('social_links'); $array_links = json_decode($social_links, true); Create a ...
Lodder's user avatar
  • 26.8k
1 vote

How to update the Repeatable fields in Joomla 3 with jQuery

By default Repeatable initialised on load event, so you have time to change the value on ready event, that occurs before load event. jQuery(document).ready(function(){ jQuery('#jform_repeatable_id')...
Fedik's user avatar
  • 644

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