Defines how one or more attachments can participate in the form. When present in the form, the user has the ability to upload an attachment specific to the form element.
Referenced by: formGroupElement, formInfo
Properties
Property | Details |
---|---|
allowUserRename | Determines whether the user renaming an attachment is allowed. |
attachmentKeyword | A string to identify the attachment(s). When a file is attached using the form, this property is used to set the value of the keywords field for the attachment. When a form is displaying existing attachments, this property is used to query attachments using an exact match on the keywords field. |
description | A string that describes the element in detail. |
displayFilename | Determines whether the file name should be displayed. Default is false . |
editableExpression | A reference to an Arcade expression that returns a boolean value. When this expression evaluates to true , the element is editable. When the expression evaluates to false the element is not editable. |
filenameExpression | Determines the name of a new attachment. If not specified, a unique name will be generated using the attachmentKeyword and the current timestamp when attachment is added. |
inputType | The input user interface to use for the attachment. Must be one of the following values: |
label | A string value indicating what the element represents. |
maxAttachmentCount | Defines the maximum number of attachments allowed for this element. If not specified, there is no maximum number required. |
minAttachmentCount | Defines the minimum number of attachments required for this element. If not specified, there is no minimum number required. |
type | String value indicating which type of element to use. Valid value of this property attachment |
useOriginalFilename | Determines whether the uploaded attachment's file name is preserved. If false , the name is updated based on filenameFormatExpression . Default is true . |
visibilityExpression | A reference to an Arcade expression that returns a boolean value. When this expression evaluates to true , the element is displayed. When the expression evaluates to false the element is not displayed. If no expression is provided, the default behavior is that the element is displayed. |
Example
{
"attachmentKeyword": "front-of-house",
"description": "Take one photo of the front of the house.",
"inputType": {
"type": "image",
"inputMethod": "any",
"maxImageSize": 1280
},
"label": "Front of house",
"type": "attachment",
"editableExpression": "expr1",
"filenameExpression": "`${$feature.parcelID}_{now}`",
"maxAttachmentCount": 1,
"minAttachmentCount": 1,
"allowUserRename": true,
"useOriginalFilename": false,
"visibilityExpression": "expr0"
}