Skip to content

Interface: IAttachmentFormCellProxy

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

Hierarchy

Summary

Properties

Class Properties

Currently none in this class.

Inherited Properties

Methods

Class Methods

Inherited Methods

Methods

getAllowedFileTypes

▸ getAllowedFileTypes(): string[]

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

Returns: string[]


getAttachmentActionType

▸ getAttachmentActionType(): string[]

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

Returns: string[]


getAttachmentAddTitle

▸ getAttachmentAddTitle(): string

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

Returns: string


getAttachmentCancelTitle

▸ getAttachmentCancelTitle(): string

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

Returns: string


getAttachmentTitle

▸ getAttachmentTitle(): string

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

Returns: string


getMaxAttachments

▸ getMaxAttachments(): number

Returns the maximum number of attachments that can be uploaded.

Returns: number


getMaxFileSize

▸ getMaxFileSize(): number

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

Returns: number


openAttachmentItem

▸ openAttachmentItem(index: number): any

Open the item of the specified attachment at given index

Parameters:

Name Type Description
index number The index of the item

Returns: any


setAllowedFileTypes

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

This method is for setting the attachment allowed file types, i.e.
If no specified value for this the AllowedFileTypes property, it allow user select any type of file; this property can contain the values just like ["pdf","jpg", "..."].

Parameters:

Name Type Description
fileType [string] value to set.

Returns: Promise<any>


setAttachmentActionType

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

This method is for setting the attachment action types, i.e. for changing the value of the AttachmentActionType property. Currently just the photo library and the camera are supported as attachment sources, so the value can contain just the values 'AddPhoto' and/or "TakePhoto" and/or "SelectFile".

Parameters:

Name Type
actionType [string]

Returns: Promise<any>


setAttachmentAddTitle

▸ setAttachmentAddTitle(addTitle: string): Promise<any>

This method is for setting the title bar of the add attachment menu, i.e. for changing the value of the AttachmentAddTitle property. The default value is 'Add'.

Parameters:

Name Type Description
addTitle string value to set.

Returns: Promise<any>


setAttachmentCancelTitle

▸ setAttachmentCancelTitle(cancelTitle: string): Promise<any>

This method is for setting the title of the cancel button on the add attachment menu, i.e. for changing the value of the AttachmentCancelTitle property. The default value is 'Cancel'.

Parameters:

Name Type Description
cancelTitle string value to set.

Returns: Promise<any>


setAttachmentTitle

▸ setAttachmentTitle(title: string): Promise<any>

This method is for setting the title of the attachment container, i.e. for changing the value of the AttachmentTitle property. The default value is 'Attachment (%d)', where %d is substituted by tha actual count of the attachments.

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.

Parameters:

Name Type
maxNumber number

Returns: Promise<any>


setMaxFileSize

▸ setMaxFileSize(maxNumber: number): Promise<any>

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

Parameters:

Name Type
maxNumber number

Returns: Promise<any>


setValueByIndex

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

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

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: any

this - allows chaining