How to solve "nested repeating components limit"?

System Information
  • Strapi Version: 3.6
  • Operating System: Ubuntu
  • Database: PostgreSQL
  • Node Version: 14
  • NPM Version: latest
  • Yarn Version: latest

Can you please tell me how I can solve the “nested repeating components limit” problem in this case?

My sites should contains some Customer Feedback Forms designing by content managers. Thay would like to describe fields for every forms by name and type. And one of neccessory fields type is SELECT (DropDown list in my UI).
In this topic mr. @DMehaffy wrote

If you need that deep level of nest I suggest using relations and not components.

I have no idea how to implement the options (values variants for select). They can be different for every select field for every form. Could someone advise to me ?

My current data structure is

In data I have:

  Sites 1->many Pages

In sections:

  CustomerForm (component for page)
      FormFields[]
           FormField (element)
                name
                type (text, date, **select**)
                (and here I can't add an options array  ) options[]
                                         key
                                         value

SOLVED

I just find and edit file components/elements/form-field.json (or your-name.json)
I’ve add

{
  "collectionName": "components_elements_form_fields",
  "info": {
    "name": "FormField",
    "icon": "traffic-light"
  },
  "options": {},
  "attributes": {
    "name": {
      "type": "string"
    },
// ==== new field I can't add in editor =======
   "SelectOplions": {
      "type": "component",
      "repeatable": true,
      "component": "elements.key-value"
    }
//=========
  }
}

Type-Builder shows new field correctly without strapi reload.

8 Likes

A lot of thanks! We struggle with the same thing. Is annoying seeing that something supported by the backend is not reflected in the frontend.

1 Like