Select to view content in your preferred language

Deprecated property warning

631
2
Jump to solution
01-16-2024 07:30 AM
Alex_Gole
New Contributor II

Good morning all,

I have a deprecation warning when using featureForm widget in Chrome. Here is what it says:

4.28/:132 [esri.form.elements.FieldElement] 🛑 DEPRECATED - Property: editable
🛠️ Replacement: editableExpression
:gear: Version: 4.26 

Here is how i set up the featureform: 

 

 

  // Listen to the feature form's submit event.
    // Update feature attributes shown in the form.
    featureForm = new FeatureForm({
        map: map,
        container: "formDiv",
        layer: boundary,
        formTemplate: {
            elements: [
                {
                    type: "field",
                    fieldName: "SAP_Order",
                    label: "New Work Order #:"
                }
            ]
        }
    });

 

 

 

Any idea how to remove this issue?

 

0 Kudos
1 Solution

Accepted Solutions
Justin_Greco
Occasional Contributor III

This warning does appear in the sample using FeatureForm, I was able to get it to go away by setting the editableExpression property to "true" for the field elements, which is the replacement for setting the deprecated editable property to true.  

https://developers.arcgis.com/javascript/latest/api-reference/esri-form-elements-FieldElement.html#e...

 

 

  // Listen to the feature form's submit event.
    // Update feature attributes shown in the form.
    featureForm = new FeatureForm({
        map: map,
        container: "formDiv",
        layer: boundary,
        formTemplate: {
            elements: [
                {
                    type: "field",
                    fieldName: "SAP_Order",
                    label: "New Work Order #:",
                    editableExpression: "true" //set editableExpression to "true"
                }
            ]
        }
    });

 

 

View solution in original post

2 Replies
Justin_Greco
Occasional Contributor III

This warning does appear in the sample using FeatureForm, I was able to get it to go away by setting the editableExpression property to "true" for the field elements, which is the replacement for setting the deprecated editable property to true.  

https://developers.arcgis.com/javascript/latest/api-reference/esri-form-elements-FieldElement.html#e...

 

 

  // Listen to the feature form's submit event.
    // Update feature attributes shown in the form.
    featureForm = new FeatureForm({
        map: map,
        container: "formDiv",
        layer: boundary,
        formTemplate: {
            elements: [
                {
                    type: "field",
                    fieldName: "SAP_Order",
                    label: "New Work Order #:",
                    editableExpression: "true" //set editableExpression to "true"
                }
            ]
        }
    });

 

 

Alex_Gole
New Contributor II

Thank you Justin!

0 Kudos