Ext version tested:
  • Ext 4.1.1a
Browser versions tested against:
  • FF,Opera,IE
DOCTYPE tested against:
  • <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">, and no DOCTYPE
Description:
  • Submit method submits only the last value of multiselect combobox
Steps to reproduce the problem:
  • Run the attached example
The result that was expected:
  • The submit method was expected to submit all values of multiselect combobox
The result that occurs instead:
  • It submits only the last value
Test Case:

Code:
    
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta http-equiv="content-type" content="text/html; charset=windows-1251" />
    <link rel="stylesheet" type="text/css" href="ext-4.1.1a/resources/css/ext-all.css" />
    <script type="text/javascript" src="ext-4.1.1a/ext-all.js"></script>
    <script type="text/javascript" src="ext-4.1.1a/locale/ext-lang-ru.js"></script>
    <script type="text/javascript">    
        Ext.Loader.setConfig({enabled: true})
        Ext.Loader.setPath('Ext.ux','ext-4.1.1a/examples/ux')
        Ext.onReady(function(){        
            Ext.define('Ext.ux.CustomTrigger2', {
                extend:'Ext.form.field.ComboBox',
                alias:'widget.multiselectcombo',
                displayField:'name',
                valueField:'id',
                queryMode:'remote',
                trigger1Cls:Ext.baseCSSPrefix+'form-clear-trigger',
                trigger2Cls:Ext.baseCSSPrefix+'form-search-trigger',
                onTrigger1Click:function(){
                    this.setValue("")
                },
                minChars:1, 
                emptyText:'Search', 
                pageSize:false,
                triggerAction:'query', 
                delimiter:','
            })            
            Ext.create('Ext.form.Panel', {
                title: 'Simple Form',
                bodyPadding: 5,
                width: 350,
                url: 'save-form.php',
                layout: 'anchor',
                defaults: {
                    anchor: '100%'
                },
                defaultType: 'textfield',
                items: [{
                    anchor:'100%',
                    labelWidth:'100%',
                    fieldLabel:'My combo',
                    labelSeparator:'',
                    xtype:'multiselectcombo',
                    multiSelect:true,
                    id:'attr_73208_',
                    name:'attr_73208_',
                    store:{fields:[{name:'id',type:'int'},{name:'name',type:'string'}],                
                    proxy:{type:'ajax',url:'json/reftext.php?id=73208'}}
                }],
                buttons: [{
                    text: 'Submit',
                    handler: function() {
                        var form = this.up('form').getForm();
                        form.submit();
                    }
                }],
                renderTo: Ext.getBody()
            });            
        });
    </script>
</head>
<body></body>
</html>
JSON looks like this

Code:
[{id:'1',name:'Россия'},{id:'2',name:'Украина'}]
HELPFUL INFORMATION

If we check the server code, we can see that in the POST we get only the last value from the combobox

Code:
<?php  // save-form.php file
     file_put_contents("txt.txt",$_POST['attr_73208_']);
?>
Additional CSS used:
  • only default ext-all.css
Operating System:
  • Win 7