Select to view content in your preferred language

Customizing FieldInspector in script

662
2
06-04-2012 09:15 AM
SachaTousignant
Regular Contributor
Hello everyone,

I'm currently working on a project where I can click on a feature on the map and appear an infoWindow with the help of the Editor.

My code :

...
// MORE ATTRIBUTES
...
// CONFUSION
var fieldInspector10:FieldInspector = new FieldInspector();
fieldInspector10.featureLayer = featureLayerFiche;
fieldInspector10.fieldName = "CONFUSION";
fieldInspector10.label="Confusion : ";
fieldInspector10.enabled=true; 
    
var attributeInspector: AttributeInspector = editorFiche.attributeInspector;
attributeInspector.featureLayers = [featureLayerFiche];
attributeInspector.fieldInspectors = [fieldInspector0, fieldInspector1, fieldInspector2, fieldInspector3, fieldInspector4, fieldInspector5, fieldInspector6, fieldInspector7, fieldInspector8, fieldInspector9, fieldInspector10];
attributeInspector.formItemsOrder = "fieldInspector";
attributeInspector.infoWindowLabel = "Title"


My problem is the following, the field CONFUSION in the infoWindow is disabled and by doing so, it's all greyed out... and I want it to look like an enabled field.
I also have a date attribute in the infoWindow that I want to change the format, because 04062012 is ugly.


If someone could help me out, it'd be REALLY appreciated, Ty all!
Tags (2)
0 Kudos
2 Replies
SachaTousignant
Regular Contributor
Let me know if you guys need more info or code.

I've been looking for some docs and forums about it but I can't find anything ...


EDIT : I've found something interesting : attributeInspector.form
Makes me able to add components such as new buttons. Does somebody know about it / how to use it properly?
Maybe it's the way I'm searching for...
0 Kudos
SachaTousignant
Regular Contributor
Still need help for this issue
0 Kudos