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()

clear the value of the widget

Parameters

None

Returns

None

disable()

disable the widget on the page.

Parameters

None

Returns

None

get_type()

Returns the widget type

Parameters

None

Returns

string

required()

Allows to Enable or Disable client side validation  

Parameters

Boolean

Returns

set_value()

Sets the value of the widget.

Parameters

Returns

None

enable()

Enable the widget on the page.

Parameters

None

Returns

None

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 filename 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 CRM FileUpload, 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-EXAMPLE-FILEUPLOAD TOGGLE

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

None

Returns

None

readonly()

 set 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