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.

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 CRM Rating 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

Returns

toggle()

toggles the visibility of the widget. ​

Example-EXAMPLE-Rating TOGGLE

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

None

Returns

None

readonly()

 set 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