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 Rating

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

None

Returns

None

get_type()

Returns the widget type.

Example-Rating Fetch Type

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

None

Returns

string

disable()

Disables the widget on the page.

Example-Disable Rating

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

None

Returns

None

get_displayInput()

Returns the Boolean display associated with the widget.

Example-Rating Fetch Display

tpc.forms[0].TpcRating.get_displayInput();
Parameters

None

Returns

JQuery Object

get_value()

Returns the file name of a selected file.

Example-Rating Fetch Value

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

None

Returns

String

enable()

Enables the widget on the page.

Example-Enable Rating

tpc.forms[0].TpcRatingenable();
Parameters

None

Returns

None

get_input()

Returns the input element of the widget.

Example-Rating Fetch Input Element

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

None

Returns

JQuery Object

get_container()

Returns the container element of the widget.

Example-Rating Fetch Container Element

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

None

Returns

​JQuery Object

hide()

Hides the widget from the form.

Example-Rating Hide

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

None

Returns

None

show()

Shows the widget on the form.

Example-Rating Show

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

None

Returns

None

set_value()

Sets the value of the widget.

Example-Rating Set Value

tpc.forms[0].TpcRating.set_value(4); tpc.forms[0].TpcRating.set_value("3");
Parameters

Integer

Returns

None

get_rating()

Returns the element associated with the widget rating icons.

Example-Rating Fetch Rating

tpc.forms[0].TpcRating.get_rating();
Parameters

None

Returns

​JQuery Object

get_model()

Returns the model object associated with the widget, along with its properties.
In the case of the Rating Field widget, these properties and their types are returned:

  • InputMode: Integer
  • Precision: Integer
  • ReadOnly: Boolean
  • StarBlankColour: String
  • StarCount: Integer
  • StarFontSize: String
  • StarHoverColour: String
  • StarHoverShadowStyle: String
  • StarSelectedColour: String
  • StarStyleClass: String
  • ZeroIsNull: Boolean

Example-Rating Fetch Model

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

None

Returns

Object

toggle()

Toggles the visibility of the widget.

Example-Rating TOGGLE

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

None

Returns

None

readonly()

 Sets the widget state to read only.

Example-Rating READONLY

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

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

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

true, false

Returns

None