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.

clear()

Clears the value of the widget.

Example-Clear FileUpload

tpc.forms[0].TpcFileUploadController.clear();
Parameters

None

Returns

None

get_selectedFileNames()

Returns the selected file names.

Example-FILEUPLOAD FETCH SELECTED FILE NAMES

tpc.forms[0].TpcFileUploadController.get_selectedFileNames();
Parameters

None

Returns

String Array

disable()

Disables the widget on the form.

Example-Disable FileUpload

tpc.forms[0].TpcFileUploadController.disable();
Parameters

None

Returns

None

get_type()

Returns the widget type.

Example-FileUpload Fetch Type

tpc.forms[0].TpcFileUploadController.get_type();
Parameters

None

Returns

String

get_dropZoneElement()

Returns the DropZone element of the widget.

Example-FileUpload Fetch DropZone Element

tpc.forms[0].TpcFileUploadController.get_dropZoneElement();
Parameters

None

Returns

jQuery Object

required()

Enables or disables client side validation.

Example-FileUpload Required

tpc.forms[0].TpcFileUploadController.required();
Parameters

Boolean

Returns

None

set_value()

Sets the value of the widget.

Example-FileUpload Set Value

tpc.forms[0].TpcFileUploadController.set_value();
Parameters

None

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.

Example-FILEUPLOAD FETCH KENDO INPUT

tpc.forms[0].TpcFileUploadController.get_kendoInput();
Parameters

None

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.

Example-Enable FileUpload

tpc.forms[0].TpcFileUploadController.enable();
Parameters

None

Returns

None

get_clearButton()

Returns the clear button element associated with the widget.

Example-FILEUPLOAD FETCH CLEAR BUTTON

tpc.forms[0].TpcFileUploadController.get_clearButton();
Parameters

None

Returns

jQuery Object

get_input()

Returns the input element of the widget.     

Example-FileUpload Fetch Input Element

tpc.forms[0].TpcFileUploadController.get_input();
Parameters

None

Returns

jQuery Object

get_container()

Returns the container element of the widget.

Example-FileUpload Fetch Container Element

tpc.forms[0].TpcFileUploadController.get_container();
Parameters

None

Returns

jQuery Object

get_element()

Returns the element of the widget.

Example-FileUpload Fetch Element

tpc.forms[0].TpcFileUploadController.get_element();
Parameters

None

Returns

jQuery Object

hide()

Hides the widget from the form.

Example-Hide FileUpload

tpc.forms[0].TpcFileUploadController.hide();
Parameters

None     

Returns

None

show()

Shows the widget on the form.

Example-Show FileUpload

tpc.forms[0].TpcFileUploadController.show();
Parameters

None

Returns

None

get_value()

Returns the file name of a selected file.

Example-FileUpload Fetch Value

tpc.forms[0].TpcFileUploadController.get_value();
Parameters

None

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

Example-FileUpload Fetch Model

tpc.forms[0].TpcFileUploadController.get_model();
Parameters

None

Returns

Object

toggle()

Toggles the visibility of the widget.

Example-FILEUPLOAD TOGGLE

tpc.forms[0].TpcFileUpload.toggle()
Parameters

None

Returns

None

readonly()

Sets the widget state to read only.

Example-FILEUPLOAD READONLY

//set to true
tpc.forms[0].TpcFileUpload.readonly(true);

//set to false
tpc.forms[0].TpcFileUpload.readonly(false);

//show the read only status
tpc.forms[0].TpcFileUpload.readonly();
Parameters

true, false

Returns

None