# plugin config valueField

**URL:** <https://forum.shopware.com/t/plugin-config-valuefield/8112>\
**Category:** Shopware 3.5\
**Tags:** programming\
**Created:** [22. August 2012 um 19:46 UTC](https://forum.shopware.com/t/plugin-config-valuefield/8112 "2012-08-22T19:46:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pino](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/pino/32/14373_2.png) [@pino](https://forum.shopware.com/u/pino)\
**Post date:** [22. August 2012 um 19:46 UTC](https://forum.shopware.com/t/plugin-config-valuefield/8112/1 "2012-08-22T19:46:00Z")

</div>

hallo zusammen, in der config eines plugins, möchte ich dem benutzer die möglichkeit geben die MwSt einzustellen. soweit kein problem. das dropdown menü zeigt mir die eingerichteten MwSt. ich möchte jedoch die id von s\_core\_tax sichern und nicht die angezeigt MwSt. dachte das ‚valueField‘=\>‚myId‘ dafür zuständig ist. tut es aber nicht. weiß jemand rat? folgedes script ist angelehnt an [http://wiki.shopware.de/Die-Shopware-Pl … #Combo-Box](http://wiki.shopware.de/Die-Shopware-Plugin-Konfiguration%5C_detail%5C_760.html#Combo-Box) ` $qry = Shopware()-\>Db()-\>fetchAll('SELECT id,tax FROM s\_core\_tax'); $dataStr = ''; $i = 0; foreach($qry as $row){ $defaultValue = $i==0 ? $row['id'] : $defaultValue; $dataStr .= '['.$row['id'].', "'.$row['tax'].'"],'; $i++; } $form-\>setElement( 'combo', 'mwst', array( 'label'=\>'MwSt', 'value'=\>$defaultValue, 'attributes'=\>array( 'valueField'=\>'myId', 'displayField'=\>'displayText', 'mode' =\> 'local', 'triggerAction' =\> 'all', 'store' =\> 'new Ext.data.ArrayStore({ id: 0, fields: ["myId", "displayText"], data: ['.substr($dataStr, 0, -1).'] })' ), 'scope'=\>Shopware\_Components\_Form::SCOPE\_SHOP ) ); `
