# Config.xml - \<defaultValue\> mit array

**URL:** <https://forum.shopware.com/t/config-xml-defaultvalue-mit-array/88913>\
**Category:** Programmierung\
**Created:** [6. Juli 2021 um 20:19 UTC](https://forum.shopware.com/t/config-xml-defaultvalue-mit-array/88913 "2021-07-06T20:19:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![myshoptheme](https://avatars.discourse-cdn.com/v4/letter/m/4da419/32.png) [@myshoptheme](https://forum.shopware.com/u/myshoptheme)\
**Post date:** [6. Juli 2021 um 20:19 UTC](https://forum.shopware.com/t/config-xml-defaultvalue-mit-array/88913/1 "2021-07-06T20:19:11Z")

</div>

Moin,

in der config.xml kann man Multi-Select-Felder erstellen. Jetzt würde ich gerne direkt einen defaultValue mitgeben - als array… so wie in meinem Beispiel funktioniert es nicht.

```auto
<input-field type="multi-select">
    <name>foobar</name>
    <label>foobar</label>
    <options>
        <option>
            <id>foo</id>
            <name>foo</name>
        </option>
        <option>
            <id>bar</id>
            <name>bar</name>
        </option>
    </options>
    <defaultValue>[foo, bar]</defaultValue>
</input-field>

```

---

<div class="post-metadata">

**Author:** ![Khronos](https://avatars.discourse-cdn.com/v4/letter/k/b5ac83/32.png) [@Khronos](https://forum.shopware.com/u/Khronos)\
**Post date:** [18. Januar 2023 um 07:27 UTC](https://forum.shopware.com/t/config-xml-defaultvalue-mit-array/88913/2 "2023-01-18T07:27:57Z")

</div>

Hallo,  
stehe vor dem gleichen Problem. Gibt es dazu eine Lösung?  
Vielen Dank.
