This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

ryan37023
ryan37023

Hi, im trying to add tabs inside the repeater items. my code so far inside fields.yaml

fields:
    content_items:
        label: "scv.facelessapi::lang.plugin.blocks.fields"
        span: full
        type: repeater
        comment: "scv.facelessapi::lang.plugin.blocks.fields_description"
        prompt: "scv.facelessapi::lang.plugin.custom_actions.add_new_item"
        form:
            fields:
                field_code:
                    label: "Field Code"
                    placeholder: "Field Code"
                    span: storm
                    comment: "Readable field code"
                    required: true
                    cssClass: "col-md-3"
                field_label:
                    label: "Field Label"
                    placeholder: "Field Label"
                span: storm
                comment: "Label of the field"
                required: true
                cssClass: "col-md-3"
                field_type:
                    label: "Field Type"
                    placeholder: "Field Type"
                    span: storm
                    comment: "Input type of the field"
                    required: true
                    cssClass: "col-md-3"
                    type: dropdown
                    options:
                        text: Text
                field_tab:
                    label: "Field Tab"
                    placeholder: "Field Tab"
                    span: storm
                    comment: "Tab of the field"
                    required: true
                    cssClass: "col-md-3"
                    type: dropdown
                    options:
                        content: Content
                        settings: Settings
                field_comment:
                    label: "Field Comment"
                    placeholder: "Field Comment"
                    span: storm
                    comment: "Comment for the field"
                    cssClass: "col-md-12"
            tabs:
                fields:
                    field_comment2:
                        label: "Field Comment"
                        placeholder: "Field Comment"
                        tab: tabexample

so far no luck though, the field_comment2 is shown under the other fields

Last updated

ryan37023
ryan37023

ok basically i found the solution with the help of nested form:

fields:
    contents:
        type: repeater
        label: Contents
        form:
            fields:
                content:
                     type: nestedform
                     usePanelStyles: false
                     form:
                          tabs:
                              fields:
                                   field_code:
                                        label: Field Code
                                        tab: Basic Settings
                                   field_options:
                                        label: Field Options
                                        type: dropdown
                                        tab: Advanced Settings

Now the field: field_code will be put inside basic settings tab, and field_options inside advanced settings, It will be nice if we can do it without nested form.

1-2 of 2

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.