Add a repeater to BbModules

Hey everyone,

I was looking through the developer documentation but couldn’t really find it, so I was wondering if anyone here knows.

At the time of writing, I am making a module (source code below).
That should contain a repeater field like this

→ Repeater
----> Title
----> Context box
----> Image upload

So I have the possibility to add multiple hero items.

01

----> Title
----> Context box
----> Image upload

02

----> Title
----> Context box
----> Image upload

etcetera


<?php

namespace Theme\Modules\RMC\BbModules;

class Hero extends \FLBuilderModule
{
    public function __construct()
    {
        parent::__construct([
            'name' => __('Hero', 'xxx'),
            'slug' => 'hero',
            'description' => __('Example', 'xxx'),
            'category' => get_bloginfo('title'),
            'dir' => dirname(__FILE__) . '/',
            'url' => get_template_directory_uri() . '/includes/bb-modules/' . basename(dirname(__FILE__)) . '/',
            'editor_export' => true,
            'enabled' => true,
        ]);

    }

    public static function formSettings()
    {

        return [
            'general' => [ // Tab
                'title' => __('Quote', 'xxxx'), // Tab title
                'sections' => [ // Tab Sections
                    'tabs' => [
                        'general' => [
                            'title' => __('General', 'fl-builder'),
                            'sections' => [
                                'general' => [
                                    'title' => '',
                                    'fields' => [
                                        'label' => [
                                            'type' => 'text',
                                            'label' => __('Label', 'fl-builder')
                                        ]
                                    ]
                                ],
                            ]
                        ]
                    ]
                ]
            ]
        ];

    }
}

Hey Team - I’m running into the same limitation with creating a custom accordion module. I want each accordion item repeater to also have an image field. Is there a solution for this?

Check the content module which is a good example.

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.