Custom Fields
Re-Envisioned
Support MB Blocks Making MB Group work with MB Blocks

  • Creator
    Topic
  • #32623
    Resolved Michele Schembri
    Participant

    I read in another support ticket that MB Groups gives you the possibility to add repeater fields. I installed MB Group and also integrated it with MB Blocks, example code shown below:

    // Block fields.
            'fields'          => [
                    'type' => 'group',
                    'id'   => 'faq_items',
                    'name' => 'FAQ Items',
                    'fields' => array(
                        array(
                            'name' => 'Question Title',
                            'id'   => 'question_title',
                            'type' => 'text',
                        ),
                        array(
                            'name' => 'Question Answer',
                            'id'   => 'question_answer',
                            'type' => 'text',
                        ),
                    ),
                ],

    This is added to the Gutenberg Block, however, it is not a repeatable list (group). Any ideas on what I might be missing, please?

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #32624
    Michele Schembri
    Participant

    Kindly disregard this as I found a solution, I was missing the following fields:

    'clone' => true,
     'sort_clone' => true,
     'collapsible' => true,
     'default_state' => 'collapsed',
     'group_title' => 'Question',
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.