For each property of a form element (group or field) allow their values to accept expressions. The exceptions to this rule would be the type, input type, fieldName properties.
While inputType might be fixed, its sub properties might benefit from being dynamic (thinking of dynamic min/max length of a text-box as part of some validation).
The same considerations should be made when introducing new form element properties.
Type: Group
- description
- Add descriptionExpression or allow inline with the description property
- Same or Similar Arcade Profile as Form Calculation
- label
- Add labelExpression or allow inline with the label property
- Same or Similar Arcade Profile as Form Calculation
visibilityExpression- Already Exists
- Utilizes Constraint Profile (returns boolean)
- initialState
- Add initialStateExpression or allow inline with initialState property
- Must return "expanded" or "collapsed"
- Or change the property name to "Expanded" and utilize the constraint profile.
- Use Case: If all values in a group are complete, collapse the group and expand another
Type: Field
- description
- Add descriptionExpression or allow inline with the description property
- Same or Similar Arcade Profile as Form Calculation
- label
- Add labelExpression or allow inline with the label property
- Same or Similar Arcade Profile as Form Calculation
editable- Already Exists (See editableExpression)
- hint
- Add hintExpression or allow inline with the hint property
- Same or Similar Arcade Profile as Form Calculation
editableExpression- Already Exists
- Utilizes Constraint Profile
visibilityExpression- Already Exists
- Utilizes Constraint Profile
requiredExpression- Already Exists
- Utilizes Constraint Profile
valueExpression- Already Exists
- Utilizes Form Calculation Profile
In addtion, many of the expression could be simplified by accepting the {fieldName} notation that we are familiar with in the popup configuration. This way we could string together the existing values of fields or develop a more dynamic expression with arcade.