AnsweredAssumed Answered

Bug with Editor Widget (disappearing custom fields)

Question asked by stephen.gregory on Oct 23, 2014
Latest reply on Oct 23, 2014 by khutchins-esristaff

Hi all,

 

I may have found a bug with the Editor Widget in the JS API v3.11; I've tested this in IE9 and IE11, and it doesn't occur in the latest versions of Firefox and Chrome. The customFields disappear when two new features are added sequentially.

 

This occurs when creating an editor widget instance, customizing the fieldInfo's to use customFields.

 

 var myDijit = new dijit.form.ValidationTextBox({
          regExp : "\\(?(\\d{3})\\)?[- ]?(\\d{3})[- ]?(\\d{4})",
          required : false, 
          promptMessage: "Enter phone number",
          invalidMessage : "Enter valid phone number"
        });
       
        var layerInfos = [{
          'featureLayer':featureLayer,
          'showAttachments':false,
          'showDeleteButton':false,
          'fieldInfos':[
            {'fieldName':'name','label':'Name'},
            {'fieldName':'email','label':'Email'},
            {'fieldName':'phone','label':'Phone','customField':myDijit},
            {'fieldName':'note','label':'Details', 'stringFieldOption':esri.dijit.AttributeInspector.STRING_FIELD_OPTION_TEXTAREA},
            {'fieldName':'notedate','label':'Date'}
          ]
        }];   

 

Steps to reproduce:

  1. Add a new feature, but don't enter any text into the customFields (i.e. "Phone" in this example).
  2. Add another new feature. When the attribute inspector opens, the customField is missing.

 

You can test this in one of the sandbox examples: http://developers.arcgis.com/javascript/sandbox/sandbox.html?sample=ed_attributeInspectorValidate

 

Also note that the same behavior occurred in Chrome for v3.10 of the API, but was fixed in v3.11. See attached screenshots.

 

Thoughts?

Outcomes