Skip to content

Class: AttachmentFormCellProxy

AttachmentFormCellProxy is a developer-facing interface that provides access to an Attachment control and allows customizations. In addition, it provides access to the IFormCellProxy interface.

Hierarchy

Implements

Summary

Constructors

Properties

Class Properties

Currently none in this class.

Inherited Properties

Accessors

Class Accessors

Currently none in this class.

Inherited Accessors

Methods

Class Methods

Inherited Methods

Constructors

Constructor

+ new AttachmentFormCellProxy(context: IContext): AttachmentFormCellProxy

Overrides FormCellControlProxy.constructor

Parameters:

Name Type
context IContext

Returns: AttachmentFormCellProxy

Methods

getAllowedFileTypes

getAllowedFileTypes(): string[]

Returns the AllowedFileTypes property value defined for the FormCell's control.

Implementation of IAttachmentFormCellProxy.getAllowedFileTypes

Returns: string[]


getAttachmentActionType

getAttachmentActionType(): string[]

Returns the AttachmentActionType property value defined for the FormCell's control.

Implementation of IAttachmentFormCellProxy.getAttachmentActionType

Returns: string[]


getAttachmentAddTitle

getAttachmentAddTitle(): string

Returns the AttachmentAddTitle property value defined for the FormCell's control.

Implementation of IAttachmentFormCellProxy.getAttachmentAddTitle

Returns: string


getAttachmentCancelTitle

getAttachmentCancelTitle(): string

Returns the AttachmentCancelTitle property value defined for the FormCell's control.

Implementation of IAttachmentFormCellProxy.getAttachmentCancelTitle

Returns: string


getAttachmentTitle

getAttachmentTitle(): string

Returns the AttachmentTitle property value defined for the FormCell's control.

Implementation of IAttachmentFormCellProxy.getAttachmentTitle

Returns: string


getMaxAttachments

getMaxAttachments(): number

Returns the maximum number of attachments that can be uploaded.

Implementation of IAttachmentFormCellProxy.getMaxAttachments

Returns: number


getMaxFileSize

getMaxFileSize(): number

Returns the maximum file size (in megabytes) allowed for each attachment.

Implementation of IAttachmentFormCellProxy.getMaxFileSize

Returns: number


openAttachmentItem

openAttachmentItem(index: number): void

Open the item of the specified attachment at given index

Implementation of IAttachmentFormCellProxy.openAttachmentItem

Parameters:

Name Type Description
index number The index of the item

Returns: void


setAllowedFileTypes

setAllowedFileTypes(fileType: [string]): Promise<any>

This method is used for setting the allowed file types for attachments. If no value is specified for the AllowedFileTypes property, users are allowed to select any type of file. This property can contain values in the form of an array, such as ["pdf", "jpg", "..."].

Implementation of IAttachmentFormCellProxy.setAllowedFileTypes

Parameters:

Name Type Description
fileType [string] value to set.

Returns: Promise<any>


setAttachmentActionType

setAttachmentActionType(actionType: [string]): Promise<any>

This method is used for setting the attachment action types, specifically for changing the value of the AttachmentActionType property. The value is an array that can contain 'AddPhoto' and/or 'TakePhoto' and/or 'SelectFile'.

Implementation of IAttachmentFormCellProxy.setAttachmentActionType

Parameters:

Name Type
actionType [string]

Returns: Promise<any>


setAttachmentAddTitle

setAttachmentAddTitle(addTitle: string): Promise<any>

This method is used to set the title bar of the add attachment menu, specifically for changing the value of the AttachmentAddTitle property. The default value is 'Add'.

Implementation of IAttachmentFormCellProxy.setAttachmentAddTitle

Parameters:

Name Type Description
addTitle string value to set.

Returns: Promise<any>


setAttachmentCancelTitle

setAttachmentCancelTitle(cancelTitle: string): Promise<any>

This method is used to set the title of the cancel button on the add attachment menu, specifically for changing the value of the AttachmentCancelTitle property. The default value is 'Cancel'.

Implementation of IAttachmentFormCellProxy.setAttachmentCancelTitle

Parameters:

Name Type Description
cancelTitle string value to set.

Returns: Promise<any>


setAttachmentTitle

setAttachmentTitle(title: string): Promise<any>

This method is used to set the title of the attachment container, specifically for changing the value of the AttachmentTitle property. The default value is 'Attachments (%d)', where %d is substituted with the actual count of the attachments.

Implementation of IAttachmentFormCellProxy.setAttachmentTitle

Parameters:

Name Type Description
title string value to set.

Returns: Promise<any>


setMaxAttachments

setMaxAttachments(maxNumber: number): Promise<any>

Sets the maximum number of attachments that can be uploaded.

Implementation of IAttachmentFormCellProxy.setMaxAttachments

Parameters:

Name Type
maxNumber number

Returns: Promise<any>


setMaxFileSize

setMaxFileSize(maxFileSize: number): Promise<any>

Sets the maximum file size (in megabytes) allowed for each attachment.

Implementation of IAttachmentFormCellProxy.setMaxFileSize

Parameters:

Name Type
maxFileSize number

Returns: Promise<any>


setValueByIndex

setValueByIndex(value: any, index: number, notify?: boolean): AttachmentFormCellProxy

Set the item's value in the attachment control. The value should be generated from: FormCellControlProxy.createAttachmentEntry() or AttachmentEntryProxy.createAttachmentEntry()

Implementation of IAttachmentFormCellProxy.setValueByIndex

Parameters:

Name Type Description
value any value to be set
index number The index of the item
notify? boolean whether to triggers the OnValueChange event on the FormCell's control

Returns: AttachmentFormCellProxy

this - allows chaining