The HybridForms FileUploader. Upload files within a form.

Hierarchy

Constructors

Properties

allowedFormats: string[]

The allowed file types. The file types are defined as an array of extensions.

audioFeedback: boolean

Enable audio feedback on button click.

buttonLabel: string

The label text for the uplaod button.

defaultValue: any
deleteOnNotFullfilledCondition: boolean

Delete all attachments if condition is not fullfilled.

descriptionEnd: string

The description text displayed before uploaded files. HTML is allowed.

descriptionStart: string

The description text displayed before uploaded files. HTML is allowed.

disposed: boolean
element: HTMLElement
enabled: any
label: string
labelEl: JQuery<HTMLElement>
maxFileSizeKb: number

The maximum file size in KB.

maxFileUploads: number

The maximum number of files to upload.

maxImagePixel: number

The maximum number of pixels for image files.

maxPDFPages: number

the maximum number of pages for PDF files.

minFileSizeKb: number

The minimum file size in KB.

minImagePixel: number

The minimum number of pixels for image files.

multipleUpload: boolean

Enable multiple file uploads.

onChanged: Function
options: any
renameFileIfExists: boolean

Suggests a unique file name for the uploaded file if another one with the same name already exists.

required: boolean
tooltip: string
visiting: boolean = false

Methods

  • Delete all files.

    Returns Promise<void>

  • Deletes the all fields related to the form control.

    Parameters

    • name: string

      The field id.

    Returns Promise<any>

  • Delete file by filename.

    Parameters

    • filename: string

      Expects a string.

    Returns Promise<void>

  • Disables the form control.

    Returns void

  • Disposes the form control.

    Returns void

  • Enables the form control.

    Returns void

  • Returns

    all fields and values that are connected with the the form control.

    Returns any

  • Gets the default value auf the form control, if it is set.

    Returns any

  • Gets the PostfixFieldId. Relevant for operations in repeating units. Check first, if the form control is contained in a repeating unit, see: isRepeatingUnit.

    Returns string

  • Hide FormControl

    Parameters

    • animate: boolean = false

      En/Disable animation

    • lock: boolean = true

      Enable lock of hidden FormControl to not process control with condition

    Returns void

  • Checks if the form control is included in a repeating unit.

    Returns boolean

  • Open file upload dialog.

    Returns Promise<void>

  • Sets the field value of the form control. Be careful: This does not update the UI. In most cases it is better to use the val() method, see: val

    Parameters

    • value: any

      The value of the field

    Returns number

  • Sets a new label value.

    Parameters

    • value: string

      The value to set.

    Returns void

  • Sets any field value by providing its id.

    Parameters

    • id: string

      The id of the field.

    • val: any

      The value of the field. Data type is an object. Its structure depends on the specific field type.

    Returns number

  • Show hidden FormControl

    Parameters

    • animate: boolean = false

      En/Disable animation

    • unlock: boolean = true

      Disable lock of hidden state to process control with condition

    Returns void

  • Upload files.

    Parameters

    • files: File[]

      Expects an array of files.

    • disableOnChanged: boolean = false

      [optional] Disables the onChanged callback if set to true. Necessary if an onChanged-Handler wants to change itself.

    Returns Promise<void>

  • Does nothing on the FileUploader.

    Parameters

    • value: any

    Returns void

Generated using TypeDoc