AnsweredAssumed Answered

make a field required in the attributeInspector with fieldInfos

Question asked by gslim on Nov 5, 2014
Latest reply on Jun 22, 2016 by Mr_Kirkwood

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");

Outcomes