AnsweredAssumed Answered

Customize attribute inspector, modifying fields at runtime

Question asked by consodata2 on Sep 7, 2015
Latest reply on Dec 8, 2015 by rtansley

Hi to all ,

i defined a layer info like below ...

 

         var layerInfoArray = [

        {

            "featureLayer": myfeaturelayer,

            "showAttachments": false,

            "showDeleteButton": false,

            "isEditable": true,

            "fieldInfos": [

            {

                "fieldName": "MyDATE",

                "label": "Date",

                "isEditable": true

            },

            {

                "fieldName": "MyTEXT",

                "label": "Note",

                "isEditable": true,

                "stringFieldOption": AttributeInspector.STRING_FIELD_OPTION_TEXTAREA

            }]

        }];

          

and attribute inspector like this ....

 

          var attributeInspector = new AttributeInspector({

            layerInfos: layerInfoArray

          }, "ui-attributes-container");

 

All works good , but i would like to change at runtime the behaviour of fields. For example for some conditions i'll like to hide one of the 2 fields or make it not editable.

Is there a way to intercept at runtime the field in the attribute inspector and change it ?

 

Thank you very much

 

GP

Outcomes