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.

set_value()

Sets the value of the widget.

Parameters

String

Returns

None

get_type()

Returns the widget type

Parameters

None

Returns

String

enable()

Enable the widget on the page.

Parameters

None

Returns

None

disable()

disable the widget on the page.

Parameters

None

Returns

None

clear()

clear the value of the widget

Parameters

None

Returns

None

get_input()

Returns the input element of the widget.

Example-Image Fetch Input Element

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

None

Returns

​JQuery Object

get_element()

Returns the input element of the widget.     

Example-Image Fetch Element

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

None

Returns

​JQuery Object

get_container()

Returns the container of the widget.

Example-Image Fetch Container Element

tpc.forms[0].TpcImageController.get_container(); ​
Parameters

None

Returns

​JQuery Object

hide()

Hides the widget from the form.

Example-Hide Image

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

None

Returns

None

show()

Shows the element on the form.

Example-Show Image

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

None

Returns

None

get_imageView()

Returns the image container associated with the widget.

Example-Image Fetch ImageView

tpc.forms[0].TpcImageController.get_imageView();
Parameters

None

Returns

​JQuery Object

get_value()

Returns the current image in the widget as a DataURL.

Example-Image Fetch Value

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

None

Returns

String

get_model()

Returns an object containing various properties about the widget.

In the case of CRM Image, the returned properties and their types are:

  • MaxFileSizeBytes: Integer

Example-Image Fetch Model

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

None

Returns

Object

toggle()

toggles the visibility of the widget. ​

Example-EXAMPLE-IMAGE TOGGLE

tpc.forms[0].Tpc​Image.toggle()
Parameters

None

Returns

None

readonly()

 set the widget state to read only

Example- IMAGE- READONLY

//set to true 
tpc.forms[0].TpcImage.readonly(true); 
 
//set to false 
tpc.forms[0].TpcImage.readonly(false); 
 
//show the read only status 
tpc.forms[0].TpcImage.readonly();
Parameters

true, false

Returns

None