GX-Feature #70548
Von Alexandre Ataides vor mehr als 1 Jahr aktualisiert
A repeater option would be handy when creating new widgets like Tabs, Carousel Images, Accordions, and so on. The repeater option should allow us to create a group of options (Textbox, Image, Numberbox, Checkbox, etc.) just so we iterate through these options and "easily" show them in SE4. In the example below, there is an array of `fields`, which contains the `textbox` and `longtextbox` options. ``` // Example of a widget.json file using the repeater ... "description" : "tabsWidget.description", "cache" : 0, "version" : "1.0.0", "displayConfig" : "modal", "fieldsets" : [ { "title" : "tabsWidget.options.content.title", "options" : [ { "id" : "repeater", "type" : "repeater", "label" : "Tabs", "attributes" : { "min" : 1, "max" : 4, "itemLabel": "Tab". "addMoreLabel" "buttonLabel" : "Add Tab", "defaultActiveIndex": "activeTab": 0 }, "fields" : [ { "id" : "title", "type" : "textbox", "label" : "Title", "value" : "" }, { "id" : "content", "default" : { "en" : { "value" : "", "title" : "" }, "de" : { "value" : "", "title" : "" } }, "type" : "longtextbox", "value" : "", "label" : "tabsWidget.options.text.label", "attributes" : { "placeholder" : "tabsWidget.options.text.placeholder" } } ], "default" : [ [ { "id" : "my-title", "title", "type" : "textbox", "repeaterField" : "title", "label" : "Title", "value" : "Foo" }, { "id" : "my-content", "repeaterField" : "content", "default" : { "en" : { "value" : "", "title" : "" }, "de" : { "value" : "", "title" : "" } }, "type" : "longtextbox", "value" : "Foo text", "label" : "tabsWidget.options.text.label", "attributes" : { "placeholder" : "tabsWidget.options.text.placeholder" } } ] ] } ] }, ... ```