RECOMMENDATION: If you are using a version of The Portal Connector higher than 4.0, we strongly recommend utilizing the MVC based widgets and components to create your site. This documentation is for legacy purposes only and will soon be deprecated.
Widget Type:
Form Widgets
TPC Version:
  • 4.0
fileuploadlogo
The File Upload widget allows you to browse your computer for a file and upload it to CRM via Form Submission. Files can be uploaded as a note to a particular record or as a SharePoint document.

FileUploadExample

Configuration

Basic

Make sure you have a Form with Form Configuration and a TPC Form Layout already attached.

Drag and drop the File Upload from the Portal Connector tools into the TPC Form Layout and click edit to display the properties prompt.

The Title will allow you to set the label for the control.

The File Upload Destination allows you to choose if an uploaded file is saved as a Note against the record or as a SharePoint document. Choosing the notes option will enable a Notes tab.

The Allowed Extensions textfield allows you to specify which files are allowed to be uploaded to a note. Each file extension type should be separated with a semicolon. 
For example default is: ".doc;.docx;.txt;.rtf;.pdf;.zip;.rar;.png;.jpg;.bmp;.jpeg".

The Allow Multiple File Uploads checkbox will allow you to upload multiple files without having to use multiple file upload widgets. 

The Rename File(s) checkbox will allow you to rename any uploaded files, regardless of their original name. When this option is selected, you will be provided with a textfield to specify a new filename.
FileUpload1

Notes

The Notes Tab allows you to further specify the Note Title and Note Description of an uploaded file.

The Note Title allows you to set the note of the title.

The Note Description allows you to set the description of the note.

file-upload-instruction-2

Widget Properties

Basic Properties

Title

The Title text box will allow you to set the label of your widget. The title will usually appear above the associated widget.

File Upload Destination

The Upload Type radio buttons allows you to define if the uploaded file is uploaded as a SharePoint Document or a CRM Note Attachment.

Allowed Extensions

The Allowed Extensions text box will only allow specific file types to be uploaded to a widget. Extensions are separated by a semicolon (.doc;.txt;.jpg;.png).

Rename File

The Rename File(s) checkbox will allow you to rename any uploaded files, regardless of its original name. When this option is selected, you will be prompted to provide a file name to replace the original.

Required Field

The Required Field checkbox will not allow a user to successfully submit the form until there is data within it. 

Upon selecting the checkbox, you will be prompted to enter an error message for invalid input.

ClientSideRequired

Allows you to enable or disable "required" from client side  

Note Title

The Note Title advanced property allows you to change the title of an uploaded note.

Note Description

The Note Description advanced property will allow you to change the description of an uploaded note.

Tool Tip

The Tool Tip allows you to add a description or Hint to your widget.

ToolTipPosition

This property determines the position of the tool tip. By default this property is set to "Auto". You can change this to Left , Right , Top , Bottom. 

LabelPosition

The LabelPosition advanced property specifies where the label of a widget will appear. By default, the label will appear on top of the widget. Applicable options include: Top and left. The content of the label is controlled by the Title property. The default value for this is 'Top'.

Hide Title

You can hide the title by setting the property value to true

RequiredIndicationLabel

The label text that appears next to the widget when marked as required.

Advanced Properties

Advanced properties provide additional functionality. They can be accessed by clicking on the "Advanced" Button in the bottom right corner of the widget designer.

Title

The Title text box will allow you to set the label of your widget. The title will usually appear above the associated widget.

File Upload Destination

The Upload Type radio buttons allows you to define if the uploaded file is uploaded as a SharePoint Document or a CRM Note Attachment.

Allowed Extensions

The Allowed Extensions text box will only allow specific file types to be uploaded to a widget. Extensions are separated by a semicolon (.doc;.txt;.jpg;.png).

Rename File

The Rename File(s) checkbox will allow you to rename any uploaded files, regardless of its original name. When this option is selected, you will be prompted to provide a file name to replace the original.

Required Field

The Required Field checkbox will not allow a user to successfully submit the form until there is data within it. 

Upon selecting the checkbox, you will be prompted to enter an error message for invalid input.

ClientSideRequired

Allows you to enable or disable "required" from client side  

Note Title

The Note Title advanced property allows you to change the title of an uploaded note.

Note Description

The Note Description advanced property will allow you to change the description of an uploaded note.

Tool Tip

The Tool Tip allows you to add a description or Hint to your widget.

ToolTipPosition

This property determines the position of the tool tip. By default this property is set to "Auto". You can change this to Left , Right , Top , Bottom. 

LabelPosition

The LabelPosition advanced property specifies where the label of a widget will appear. By default, the label will appear on top of the widget. Applicable options include: Top and left. The content of the label is controlled by the Title property. The default value for this is 'Top'.

Hide Title

You can hide the title by setting the property value to true

RequiredIndicationLabel

The label text that appears next to the widget when marked as required.

API

clear()

Clears the value of the widget.

Returns

None

get_selectedFileNames()

Returns the selected file names.

Returns

String Array

disable()

Disables the widget on the form.

Returns

None

get_type()

Returns the widget type.

Returns

String

get_dropZoneElement()

Returns the DropZone element of the widget.

Returns

jQuery Object

required()

Enables or disables client side validation.

Returns

None

set_value()

Sets the value of the widget.

Returns

None

get_kendoInput()

Returns the Kendo input object associated with the widget.
In the case of the CRM textfield, only certain input modes will use a Kendo input object, otherwise, it will throw an error.
The input modes are: 
Numeric textfield, masked textfield and HTML textfield.

Returns

Kendo Object:
Kendo.ui.Editor Object if set to HTML Editor
Kendo.ui.MaskedTextBox Object if Mask is set
Kendo.ui.NumericTextBox Object if Numeric attribute is used

enable()

Enables the widget on the form.

Returns

None

get_clearButton()

Returns the clear button element associated with the widget.

Returns

jQuery Object

get_input()

Returns the input element of the widget.     

Returns

jQuery Object

get_container()

Returns the container element of the widget.

Returns

jQuery Object

get_element()

Returns the element of the widget.

Returns

jQuery Object

hide()

Hides the widget from the form.

Returns

None

show()

Shows the widget on the form.

Returns

None

get_value()

Returns the file name of a selected file.

Returns

String

get_model()

Returns the model object of the widget, which contains a number of useful properties.
In the case of the File Upload widget, these returned properties and their types are:

  • AllowedExtensions: String
  • MaxFileSizeBytes: Integer

Returns

Object

toggle()

Toggles the visibility of the widget.

Returns

None

readonly()

Sets the widget state to read only.

Returns

None