Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently posted this question on the Esri forums and thought I'd give stack exchange a try too.

I'd like to take this sample:

and change the text boxes to text areas similar to the "Editor with Toolbar (Union)" sample.

You can find these samples by going to:

The one I am trying to customize is listed under Editing - Edit Modifiable Fields One of the samples that uses text areas instead of text boxes is under Editing - Editor with Toolbar (Union)

Any help would be greatly appreciated. If you find a line of code that you think I need to add, please tell me exactly where it needs to be added in the "Edit Modifiable Fields" sample.

share|improve this question
Note: Seem these examples don't work fully with FireFox 4 (missing elements). IE9/10 okay. – Mapperz May 25 '11 at 16:12

Create a custom fieldInfos array. In the first sample, modify the initEditing function. The code would look something like this to make the field named "notes" into a textarea:

dojo.forEach(layers, function(layer) {
  dojo.connect(layer, "onClick", function(evt) {
    if (map.infoWindow.isShowing) {

    var fieldInfos =, function(field) {
      if ( === 'notes') {
        return { 'fieldName':, 'label': field.alias, 'stringFieldOption': 'textarea' };
      } else {
        return { 'fieldName':, 'label': field.alias };

    var layerInfos = [{
      'featureLayer': layer,
      'isEditable': false,
      'fieldInfos': fieldInfos

    var attInspector = new esri.dijit.AttributeInspector({
      layerInfos: layerInfos
    }, dojo.create("div"));

    query.objectIds = [evt.graphic.attributes.objectid];
    layer.selectFeatures(query, esri.layers.FeatureLayer.SELECTION_NEW, function(features) {
      map.infoWindow.resize(310, 165);, map.getInfoWindowAnchor(evt.screenPoint));
share|improve this answer
Thank you Derek! This worked and so did the few lines of code that Heming Zhu submitted on the Esri User Forums:… You can see a more detailed account of my thanks there... the info window for new points as they are being created does not appear as a text area, but at this point I'm ready to leave well enough along! – Indy May 25 '11 at 20:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.