pchapuis

Deactivate the popup opening with Editor

Discussion created by pchapuis on Aug 19, 2012
Latest reply on Jan 29, 2013 by khutchins-esristaff
API JS 3.1

Hi everyone,

I use the esri.dijit.editing.Editor to edit my layers. Unfortunately, I don't want to use the popup on the elements provided by the Editor because I have to use complex forms on my own.

But the Editor call standards popup wathever I do.

Any idea? Thanks by advance

My simplified code about the Editor
var layerInfos = new Array();
function initEditor(){
  for(var i=0; i<userConfig.layerItems.length; i++){
   var layer = map.getLayer(userConfig.layerItems[i].uniqueID);
   if(layer.fields!=undefined){
    var fieldInfos = dojo.map(layer.fields, function(field) {
     if (field.name === 'description') {
      return {
       'fieldName' : field.name,
       'label' : 'Details',
       stringFieldOption : esri.dijit.AttributeInspector.STRING_FIELD_OPTION_TEXTAREA
      };
     } else {
      return {
       'fieldName' : field.name,
       'label' : field.alias
      };
     }
    });
      dojo.connect(layer, "onEditsComplete", openForm);
      dojo.connect(layer, "onClick", openForm);
    
       // Ajout aux layerInfos
          layerInfos.push({
            featureLayer : layer,
            fieldInfos : fieldInfos
           });
   }
  }
      
  var params = {
   settings : {
    map : map,
    enableUndoRedo : true,
    layerInfos : layerInfos,
    toolbarVisible : true,
    createOptions : {
     polygonDrawTools : [
       esri.dijit.editing.Editor.CREATE_TOOL_FREEHAND_POLYGON,
       esri.dijit.editing.Editor.CREATE_TOOL_AUTOCOMPLETE ]
    },
    toolbarOptions : {
     reshapeVisible : true,
     cutVisible : true,
     mergeVisible : true
    }
   }
  };
  editorWidget = new esri.dijit.editing.Editor(params, 'editorDiv');
  editorWidget.startup();
}

function openForm(){
 alert("Form");
 console.log(this);
}

Outcomes