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.

enable()

Enables the widget on the form.

Example-Enable Barcode

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

None

Returns

None

disable()

Disables the widget on the form.

Example-Disable Barcode

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

None

Returns

None

get_type()

Returns the widget type.

Example-Barcode Fetch Type

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

None

Returns

String

clear()

Clears the value of the widget.

Example-Clear Barcode

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

None

Returns

None

get_container()

Returns the container element of the widget.     

Example-Barcode Fetch Container Element

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

None

Returns

jQuery Object     

get_element()

Returns the element of the widget.

Example-Barcode Fetch Element

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

None

Returns

jQuery Object

get_input()

Returns the input element of the widget.

Example-Barcode Fetch Input Element

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

None

Returns

JQuery Object

get_value()

Returns the value of the attribute that the barcode widget has been configured to use.

Example-Barcode Fetch Value

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

None

Returns

String

hide()

Hides the widget from the form.

Example-Hide Barcode

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

None

Returns

None

show()

Shows the widget on the form.

Example-Show Barcode

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

None

Returns

None

set_background()

Sets the colour of the background. This can be done in a variety of ways.

Example-Barcode Set Background

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

String

Returns

None

set_borderColor()

Sets the colour of the border associated with the widget. This can be done in a variety of ways.

Example-Barcode Set Border Colour

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

String

Returns

None

set_borderDashType()

Sets the style of the border associated with the widget. Some border dash types include: solid and dotted.

Example-Barcode Set Border Dash Type

tpc.forms[0].TpcBarcode.set_borderDashType("solid");
Parameters

String

Returns

None

set_borderWidth()

Sets the width of the border associated with the widget.

Example-Barcode Set Border Width

tpc.forms[0].TpcBarcode.set_borderWidth("10"); tpc.forms[0].TpcBarcode.set_borderWidth(5);
Parameters

String

Returns

None

set_color()

Sets the colour of the widget. In the case of the Barcode widget, this will set the colour of the bars.

Example-Barcode Set Colour

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

String

Returns

None

set_height()

Sets the height of the widget.

Example-Barcode Set Height

tpc.forms[0].TpcBarcode.set_height(200);
Parameters

String

Returns

None

set_paddingBottom()

Sets the bottom padding of the widget.

Example-Barcode Set Bottom Padding

tpc.forms[0].TpcBarcode.set_paddingBottom(10);
Parameters

String

Returns

None

set_paddingLeft()

Sets the left-side padding of the widget.

Example-Barcode Set Left Padding

tpc.forms[0].TpcBarcode.set_paddingLeft(10);
Parameters

String

Returns

None

set_paddingRight()

Sets the right-side padding of the widget.

Example-Barcode Set Right Padding

tpc.forms[0].TpcBarcode.set_paddingRight(10);
Parameters

String     

Returns

None

set_paddingTop()

Sets the top padding of the widget.

Example-Barcode Set Top Padding

tpc.forms[0].TpcBarcode.set_paddingTop(10);
Parameters

String

Returns

None

set_renderAs()

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

Example-Barcode Set Render As

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

String

Returns

None

set_textColor()

Sets the colour of the text associated with the widget.

Example-Barcode Set Text Colour

tpc.forms[0].TpcBarcode.set_textColor("rgb(255,0,0)");
Parameters

String

Returns

None

set_textFont()

Sets the font of the text associated with the widget.

Example-Barcode Set Text Font

tpc.forms[0].TpcBarcode.set_textFont("Helvetica");
Parameters

String

Returns

None

set_textMarginBottom()

Sets the margin of the text associated with the widget.

Example-Barcode Set Bottom Text Margin

tpc.forms[0].TpcBarcode.set_textMarginBottom(25);
Parameters

String

Returns

None

set_textMarginLeft()

Sets the left-side margin of the text associated with the widget.

Example-Barcode Set Left Text Margin

tpc.forms[0].TpcBarcode.set_textMarginLeft(25);
Parameters

String

Returns

None

set_textMarginRight()

Sets the right-side margin of the text associated with the widget.

Example-Barcode Set Right Text Margin

tpc.forms[0].TpcBarcode.set_textMarginRight(25);
Parameters

String

Returns

None

set_textMarginTop()

Sets the top margin of the text associated with the widget.

Example-Barcode Set Text Top Margin

tpc.forms[0].TpcBarcode.set_textMarginTop(25);
Parameters

String

Returns

None

set_type()

Sets the encoding type of the widget.

Example-Barcode Set Encoding Type

tpc.forms[0].TpcBarcode.set_type("Code93Extended"); tpc.forms[0].TpcBarcode.set_type("EAN8");
Parameters

String

Returns

None

set_value()

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

Example-Barcode Set Value

tpc.forms[0].TpcBarcode.set_value("James Bond");
Parameters

String

Returns

None

set_width()

Sets the width of the widget.

Example-Barcode Set Width

tpc.forms[0].TpcBarcode.set_width(350);
Parameters

String

Returns

None

showChecksum()

Shows or hides the checksum associated with the widget. The default value for this is 'false'.

Example-Barcode Show and Hide Checksum

tpc.forms[0].TpcBarcode.showChecksum(true); tpc.forms[0].TpcBarcode.showChecksum(false);
Parameters

Boolean

Returns

None

showText()

Shows or hides the text associated with the widget. The default value for this is 'true'.

Example-Barcode Show and Hide Text

tpc.forms[0].TpcBarcode.showText(true); tpc.forms[0].TpcBarcode.showText(false);
Parameters

Boolean

Returns

None

toggle()

Toggles the visibility of the widget on the form.

Example-BARCODE TOGGLE

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

None

Returns

None

readonly()

Sets the widget state to read only.

Example- BARCODE READONLY

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

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

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

true, false

Returns

None