Portal Connector Secrets, Shhhh... (Part 2)
The Portal Connector Version
To get the version of The Portal Connector you have installed, simply type in “tpc.version” in the console.
The Portal Connector Forms
To get an array of the forms that are active on the current page, simply type in “tpc.forms” in the console.
This will also allow you to access the form widgets inside individual forms. Here is an example of accessing a Portal Connector form widget inside a form:
To get the Form Name of the form, simply type in “tpc.forms.$$name”. Where 0 is the index of the form you want to access.
The Portal Connector Pages Widgets
To get the Portal Connector page widgets, simply type in “tpc.page”. This will give an object listing the page widgets that are in the current page and it allows you to access the API for individual page widgets.
Click here for more information about the individual TPC Widgets API.
Validate Portal Connector Form
You can easily validate a Portal Connector form from the client side, using The Portal Connector API by simply passing the from name to the isFormValid() function, See Below:
Find & Find All
You can find all of The Portal Connector form widgets in the page by simply typing in “tpc.findAll()”.
You can also find a specific widget by simply typing in “tpc.find()” and passing the name of the widget.
You can also get the current logged in user's information by simply typing in “tpc.identity”.
Stay tuned for Part 3 of this Portal Connector Secrets blog series.