# Fieldtype set in repeater field

**URL:** <https://discourse.getcockpit.com/t/fieldtype-set-in-repeater-field/362>\
**Category:** Support\
**Created:** [October 24, 2018, 11:15am UTC](https://discourse.getcockpit.com/t/fieldtype-set-in-repeater-field/362 "2018-10-24T11:15:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonny](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/jonny/32/133_2.png) [@jonny](https://discourse.getcockpit.com/u/jonny)\
**Post date:** [October 24, 2018, 11:15am UTC](https://discourse.getcockpit.com/t/fieldtype-set-in-repeater-field/362/1 "2018-10-24T11:15:05Z")

</div>

Hi there,

I’m completely new to Cockpit and hope you can help.

I tried to set up a set field in a repeater field but that doesn’t work. Is my approach wrong?

```
{
   "fields": [
      {
        "type": "text",
        "label": "Text"
      },
      {
        "type": "html",
        "label": "Html Code"
      },
      {
        "type": "set",
        "label": "Multiple",
        "fields": [
         {
            "name": "name",
            "type": "text"
          },
          {
            "name": "about",
            "type": "html"
          }
        ]
      }
    ]
}

```

With that setup it says “Fields definition is missing”.

Best Regards  
Jonny

---

<div class="post-metadata">

**Author:** ![raffaelj](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/raffaelj/32/331_2.png) [@raffaelj](https://discourse.getcockpit.com/u/raffaelj)\
**Post date:** [October 24, 2018, 12:30pm UTC](https://discourse.getcockpit.com/t/fieldtype-set-in-repeater-field/362/2 "2018-10-24T12:30:42Z")

</div>

You have to nest the fields inside set in `{"options":{"fields":[...]}}`

```json
{
  "fields": [
    {
      "type": "text",
      "label": "Text"
    },
    {
      "type": "html",
      "label": "Html Code"
    },
    {
      "type": "set",
      "label": "Multiple",
      "options": {
        "fields": [
          {
            "name": "name",
            "type": "text"
          },
          {
            "name": "about",
            "type": "html"
          }
        ]
      }
    }
  ]
}

```

---

<div class="post-metadata">

**Author:** ![jonny](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/jonny/32/133_2.png) [@jonny](https://discourse.getcockpit.com/u/jonny)\
**Post date:** [October 24, 2018, 2:36pm UTC](https://discourse.getcockpit.com/t/fieldtype-set-in-repeater-field/362/3 "2018-10-24T14:36:19Z")

</div>

Thank you! That solved it. 🙂
