I have created a dynamic form engine. All is working fine with the exception of populating combo controls with both hidden values and display values from a Json string.
The combo definition looks something like this:
Code:
{
'xtype':'combo',
'fieldLabel':'This Field Label',
'id':'fld_1DisplayValue',
'name': 'fld_1DisplayValue',
'hiddenName': 'fld_1',
'handler': '',
'submitValue':true,
'anchor':'100%',
'store':comboStore,
'mode':'remote',
'triggerAction': 'all',
'displayField':'DisplayValue',
'valueField':'RecordValue',
'loadingText':'Loading',
'pageSize':10,
'listeners':{ 'focus': function(thisField) { DoSetComboDataSource(thisField); }, 'blur': function(thisField) { thisField.collapse(); }}
}
The Json string (the important parts) look like this:
Code:
{ 'fld_1': '4', 'fld_1DisplayValue': 'This display value'}
When the form data is loaded all fields populate as expected, with the exception of the combos. Both the hidden value and display values are populated with “4”. I would expect that the display value would be “This display value”.
Any guidance would be much appreciated.