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.

Example-Image Set Value

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

String

Returns

None

get_type()

Returns the widget type.

Example-Image Fetch Type

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

None

Returns

String

enable()

Enables the widget on the form.

Example-Enable Image

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

None

Returns

None

disable()

Disables the widget on the form.

Example-Disable Image

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

None

Returns

None

clear()

Clears the value of the widget.

Example-Clear Image

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

None

Returns

None

get_input()

Returns the input element of the widget.

Example-Image Fetch Input Element

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

None

Returns

jQuery Object

get_element()

Returns the input element of the widget.

Example-Image Fetch Element

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

None

Returns

jQuery Object

get_container()

Returns the container element of the widget.

Example-Image Fetch Container Element

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

None

Returns

jQuery Object

hide()

Hides the widget from the form.

Example-Hide Image

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

None

Returns

None

show()

Shows the widget on the form.

Example-Show Image

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

None

Returns

None

get_imageView()

Returns the image container associated with the widget.

Example-Image Fetch ImageView

tpc.forms[0].TpcImage.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].TpcImage.get_value();
Parameters

None

Returns

String

get_model()

Returns an object containing various properties about the widget.
In the case of the Image widget, the returned properties and their types are:

  • MaxFileSizeBytes: Integer

Example-Image Fetch Model

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

None

Returns

Object

toggle()

Toggles the visibility of the widget. 

Example-IMAGE TOGGLE

tpc.forms[0].TpcImage.toggle();
Parameters

None

Returns

None

readonly()

Sets 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