Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Bug report: Multiple Select item returnin wrong values

    Hi,

    I'm having a problem with select items returning wrong values when i set multiple to true.

    I've separated a small example:

    Code:
    isc.DynamicForm.create({
    			"ID":"form",
    			"fields": [{
    				"name":"groups[]",
    				"title":"Grupos",
    				"type":"select",
    				"multiple":true,
    				"valueMap":{
    					"1": "2",
    					"2": "Default"
    				}
    			},{
    				"name": "submit",
    				"title": "Submit",
    				"type": "button",
    				"click": function() {
    					console.log(form.getValue('groups[]'));
    				}
    			}],
    			"canSubmit":false,
    			"saveOnEnter":true
    		});
    After you load this, select "Default" option only and click Submit. You will see "1" at firebug console, while the correct would be "2".

    If you set multiple to false, this error does not happen.

    I know the valueMap is strange, but i found this when an user was adding some of his groups with a number as name.

    Thanks.
    Last edited by fernandomm; 29 Oct 2010, 04:08.
Working...
X