# How to configure store for combobox in custom shopping world element?

**URL:** https://forum.shopware.com/t/how-to-configure-store-for-combobox-in-custom-shopping-world-element/52505
**Category:** International (English Only)
**Tags:** programming, shopping-worlds
**Created:** [20. April 2018 um 14:57 UTC](https://forum.shopware.com/t/how-to-configure-store-for-combobox-in-custom-shopping-world-element/52505 "2018-04-20T14:57:56Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![odessite](https://avatars.discourse-cdn.com/v4/letter/o/f05b48/32.png) [@odessite](https://forum.shopware.com/u/odessite)
#### Post date: [15. Juni 2018 um 12:10 UTC](https://forum.shopware.com/t/how-to-configure-store-for-combobox-in-custom-shopping-world-element/52505/3 "2018-06-15T12:10:20Z")

</div>

displayField - contain info, which should be visible for customer.

valueField - contain info, which should be send to server as selected value.

As example:

```
_Ext_. **create** ( **'Ext.form.field.ComboBox'** , { **xtype** : **'combobox'** , **triggerAction** : **'all'** , **name** : **'approve'** , **fieldLabel** :me. **snippets**. **toolbar**. **type** , **store** : _Ext_. **create** ( **'Ext.data.Store'** , { **fields** : [**'id'** , **'type'**], **data** : [{ **"id"** : 0, **"type"** : **'Awaiting'** }, { **"id"** : 1, **"type"** : **'Approved'** }] }), **value** : 0, **labelWidth** : 40, **width** : 150, **emptyText** : me. **snippets**. **toolbar**. **awayting** , **listeners** : { change: **function** (field, value) { me.searchApproveEvent(field, value); } }, **valueField** : **'id'** , **displayField** : **'type'** , **enableKeyEvents** : **true** , **checkChangeBuffer** :500 });

```

So there is only 2 columns - `id` and `type` - you set for display column `type` and column `id` as value.

For example you can see **themes/Backend/ExtJs/backend/config/view/form/document.js**

```
 { **name** : **'numbers'** , **xtype** : **'config-element-select'** , **valueField** : **'name'** , **displayField** : **'description'** , **store** : **'Shopware.apps.Config.store.form.Number'** , **fieldLabel** : **'{s name=document/detail/numbers\_label}Numbers{/s}'** }

```

[http://joxi.ru/DmBLBQ8SwXOBnA](http://joxi.ru/DmBLBQ8SwXOBnA)

---

_[View the full topic](https://forum.shopware.com/t/how-to-configure-store-for-combobox-in-custom-shopping-world-element/52505)._
