I have two elements in the FeatureForm widget and I want to hide the second as long the first is blank. Once something is input in the first element then the second should appear.
This is similar to the Smart Editor functionality in WAB.
I tried this:
elements: [{
// Autocasts to new GroupElement
type: "group",
label: "Testing",
elements: [{ // Autocasts to new FieldElement
type: "field",
fieldName: "first",
label: "First"
},
{
type: "field",
fieldName: "second",
label: "Second",
visibilityExpression: "IIF(!IsEmpty($feature.first))"
}
]
},
Solved! Go to Solution.
As seen in the documentation for the visibilityExpression property, you cannot use this property to define your Arcade expression. Instead, it must reference a value in the expressionInfos collection, which is where your Arcade expression must go.
There's an example nearly identical to what you're trying to do in the Form Constraint section of the Arcade reference page that will probably help.
As seen in the documentation for the visibilityExpression property, you cannot use this property to define your Arcade expression. Instead, it must reference a value in the expressionInfos collection, which is where your Arcade expression must go.
There's an example nearly identical to what you're trying to do in the Form Constraint section of the Arcade reference page that will probably help.