No Code Attached Yet Information Required
avatar romeolandry
romeolandry
5 Dec 2025

The error occurs when I nest multiple subform fields.
I wrote the following code to fix the issue:

// Flatten the value if it is an array (list, checkboxes, etc.), independent of render_values
if (is_array($subfield->value)) {
    if (!empty($subfield->value)) {
        $new_value = "";

        array_walk_recursive($subfield->value, function ($value) use (&$new_value) {
            $new_value .= $value . " ";
        });

        $subfield->value = trim($new_value);
    } else {
        $subfield->value = implode(' ', $subfield->value);
    }
}
avatar romeolandry romeolandry - open - 5 Dec 2025
avatar romeolandry romeolandry - change - 5 Dec 2025
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 5 Dec 2025
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 5 Dec 2025
avatar richard67
richard67 - comment - 5 Dec 2025

@Fedik As it is about subforms: Could you check this issue? I'm not sure if the proposed solution is right.

avatar Fedik
Fedik - comment - 5 Dec 2025

@romeolandry please provide more information.
What error occur?
How did you create subform, using Content Custom field or with XML in your extension?
With the fields example.

avatar MacJoom MacJoom - change - 6 Dec 2025
Labels Added: Information Required
avatar MacJoom MacJoom - labeled - 6 Dec 2025

Add a Comment

Login with GitHub to post a comment