Expand my Community achievements bar.

SOLVED

How to use GuideBridge API outside AF forms like in custom component?

Avatar

Level 4

Hi,
The may not be correct but I wanted to know if it's possible to use GuideBridge API outside AF forms in Sites for custom custom or something. I would like to use it in my component's JS but don't how to leverage API in its JS file.
Could anyone please enlighten me on this? Please share snippet to initiate the API in js & use it. 
Thanks,
sesmic

1 Accepted Solution

Avatar

Correct answer by
Level 4

Yes, you can use

Create a clientlib (or your sites clientlib) add this function in it

You have to declare the form variables names,

then call one method from rootpanel and pass som exp of rootpanel as parameter. Now you got the som of rootPanel. then call the below method inside the roopanel method

function initializeFundFormVariable(rootData) {
rootPanel = rootData;
declareAllVariables();
}

function declareAllVariables() {

window.guideBridge.connect(function () {
guideBridgeData = guideBridge;
if (guideBridge && rootPanel) {
(rootPanel = guideBridge.resolveNode(rootPanel))

}});

}

View solution in original post

1 Reply

Avatar

Correct answer by
Level 4

Yes, you can use

Create a clientlib (or your sites clientlib) add this function in it

You have to declare the form variables names,

then call one method from rootpanel and pass som exp of rootpanel as parameter. Now you got the som of rootPanel. then call the below method inside the roopanel method

function initializeFundFormVariable(rootData) {
rootPanel = rootData;
declareAllVariables();
}

function declareAllVariables() {

window.guideBridge.connect(function () {
guideBridgeData = guideBridge;
if (guideBridge && rootPanel) {
(rootPanel = guideBridge.resolveNode(rootPanel))

}});

}