kait_davis

multiselect widget not populating

Discussion created by kait_davis on Dec 10, 2013
Latest reply on Jan 20, 2015 by wpgis5673
For those who may be dojo savvy: I am trying to build a multiselect widget to place in an attribute inspector and it is not populating with my options. It just stays blank. Does anyone familiar with the widget see anything wrong with the way I set it up?


[HTML]
var testm = dojo.byId('testmulti');
var op1 = dojo.doc.createElement('option');
op1.innerHTML = "option1";
op1.value = "option1";
testm.appendChild(op1);
var op2 = dojo.doc.createElement('option');
op1.innerHTML = "option2";
op1.value = "option2";
testm.appendChild(op2);

var myMultiSelect = new dijit.form.MultiSelect({ name: 'testmulti', id: 'testmulti', style: "width:150px;"}, testm);

var layers = dojo.map(results, function(result) {
return {
  featureLayer:result.layer,
  showAttachments:true,
  showDeleteButton:true,
  fieldInfos:[
   {fieldName: "TEST", visible: true,'label':"test 1", 'customField': myMultiSelect},
   {fieldName: "TEST2", visible: true, 'label':"test 2"}
  ]
};
});
[/HTML]

Outcomes