Select to view content in your preferred language

make a field required in the attributeInspector with fieldInfos

1214
1
11-05-2014 02:20 PM
ShaneLim
Deactivated User

How do I make a specific field required in the attributeInspector within the fieldInfos setup I would think.

var layerInfos = [{

                    'featureLayer': featureLayer,

                    'showAttachments': false,

                    'showDeleteButton': true,

                    'fieldInfos': [

                        { 'fieldName': 'OBJECTID', 'label': 'ObjectID' },

                        {

                            'fieldName': 'INSSTART', 'label': 'Flow Time', "format": {

                                "time": true

                            }

                        },

                        { 'fieldName': 'STATICPSI', 'label': 'Static (PSI)' },

                        { 'fieldName': 'RESIDUALPSI', 'label': 'ResidualPSI' },

                        { 'fieldName': 'PITOT', 'label': 'Pitot' },

                        { 'fieldName': 'OUTLETDIAMETER', 'label': 'Outlet Diameter' },

                        { 'fieldName': 'FLOWMINUTE', 'label': 'Flow Minute' },

                        { 'fieldName': 'INSPECTOR', 'label': 'Flowed By' },

                        { 'fieldName': 'NOTES', 'label': 'Notes' },

                        { 'fieldName': 'FACILITYKEY', 'label': 'Hydrant ID' },                                         

                        { 'fieldName': 'CALCFLOW20PSI', 'label': 'CalcFlow20PSI' },

                        { 'fieldName': 'FLOW', 'label': 'Flow Rate (GPM)' },                       

                        { 'fieldName': 'LASTUPDATE', 'label': 'Last Update Date' },

                        { 'fieldName': 'INSPECTID', 'label': 'InspectionNumber' }

                       

                    ]

                }];

var attributeInspector = new AttributeInspector({ layerInfos: layerInfos }, "attributeDiv");

                var attributeInspector = new AttributeInspector({ layerInfos: layerInfos }, "attributeDiv");

1 Reply
RobertKirkwood
Frequent Contributor
0 Kudos