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?
Solved! Go to Solution.
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.
// 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"
}
]
}
});
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.
// 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"
}
]
}
});
Thank you Justin!