How to use GuideBridge API outside AF forms like in custom component? | Community
Skip to main content
sesmic
Level 4
August 27, 2023
Solved

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

  • August 27, 2023
  • 1 reply
  • 718 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by aravindS

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))

}});

}

1 reply

aravindSAccepted solution
Level 5
September 8, 2023

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))

}});

}