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 QR Code

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

None

Returns

None

get_type()

Returns the widget type.

Example-QR Code Fetch Type

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

None

Returns

String

readonly()

Sets the widget state to read only.

Example-QR Code ReadOnly

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

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

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

true, false

Returns

None

enable()

Enables the widget on the page.

Example-Enable QR Code

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

None

Returns

None

disable()

Disables the widget on the page.

Example-Disable QR Code

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

None

Returns

None

get_container()

Returns the container element of the widget.     

Example-QR Code Fetch Container Element

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

None

Returns

jQuery Object     

get_element()

Returns the element of the widget.

Example-QR Code Fetch Element

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

None

Returns

jQuery Object

get_input()

Returns the input element of the widget.

Example-QR Code Fetch Input Element

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

None

Returns

jQuery Object

get_value()

Returns the value of the chosen attribute of the widget.

Example-QR Code Fetch Value

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

None

Returns

String

hide()

Hides the widget from the form.

Example-Hide QR Code

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

None

Returns

None

show()

Shows the widget on the form.

Example-Show QR Code

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

None

Returns

None

set_background()

Sets the background colour of the widget.

Example-QR Code Set Background Color

tpc.forms[0].TpcQRBarcode.set_background("rgb(255,0,0)");
Parameters

None

Returns

String

set_borderColor()

Sets the border colour of the widget.

Example-QR Code Set Border Color

tpc.forms[0].TpcQRBarcode.set_borderColor("rgb(0,255,0)");
Parameters

None

Returns

String

set_borderWidth()

Sets the width of the border associated with the widget.

Example-QR Code Set Border Width

tpc.forms[0].TpcQRBarcode.set_borderWidth(10);
Parameters

None

Returns

String

set_color()

Sets the colour of the widget. In the case of the QR Code widget, this will set the colour of the QR Code itself.

Example-QR Code Set Color

tpc.forms[0].TpcQRBarcode.set_color("rgb(0,0,255)"); tpc.forms[0].TpcQRBarcode.set_color("Green");
Parameters

None

Returns

String

set_encoding()

Sets the encoding type for the QR Code widget to adhere to.

Example-QR Code Set Encoding Type

tpc.forms[0].TpcQRBarcode.set_encoding("ISO_8859_1"); tpc.forms[0].TpcQRBarcode.set_encoding("UTF-8");
Parameters

String

Returns

None

set_errorCorrection()

Sets the error correction level for the widget. More information on error correction levels can be found here. The default value is 'L'.

Example-QR Code Set Error Correction

tpc.forms[0].TpcQRBarcode.set_errorCorrection("L"); tpc.forms[0].TpcQRBarcode.set_errorCorrection("M"); tpc.forms[0].TpcQRBarcode.set_errorCorrection("Q"); tpc.forms[0].TpcQRBarcode.set_errorCorrection("H");
Parameters

None

Returns

String

set_padding()

Sets the padding of the widget.

Example-QR Code Set Padding

tpc.forms[0].TpcQRBarcode.set_padding(45);
Parameters

None

Returns

String

set_renderAs()

Sets the preferred rendering engine. The default value for this is 'svg'. More information on this method can be found here.

Example-QR Barcode Set Render

tpc.forms[0].TpcQRBarcode.set_renderAs("svg"); tpc.forms[0].TpcQRBarcode.set_renderAs("canvas"); tpc.forms[0].TpcQRBarcode.set_renderAs("vml");
Parameters

None

Returns

String

set_size()

Sets the size of the widget. The default value is '150'.

Example-QR Barcode Set Size

tpc.forms[0].TpcQRBarcode.set_size(600); tpc.forms[0].TpcQRBarcode.set_size("750");
Parameters

None

Returns

String, Integer

set_value()

Sets the value of the widget. In the case of the QR Barcode widget, a new barcode will be rendered based on this value.

Example-QR Barcode Set Value

tpc.forms[0].TpcQRBarcode.set_value("Ottawa");
Parameters

None

Returns

None

toggle()

Toggles the visibility of the widget. 

Example-QR Code TOGGLE

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

None

Returns

None