Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Updating adaptive form values from Javascript not retaining

jeevan25597530
Level 1
Level 1

Hi,

I'm facing an issue like updating adaptive form field's values from Javascript is not retaining/updating in the form, whereas I can see the updated values in the fields.

So, the issue is that the form field is still showing as empty when submitting, although it has been updated from js.

For textbox field, I able to overcome this issue like focusing it when updating value from js as below.

$("#selector").focus().val("somevalue");

But,for drop down I'm not able to. Help me on this if anyone has idea on this.

1 Accepted Solution
workflowuser
Correct answer by
Employee
Employee

you can get the som expression of the field from the ui

1835934_pastedImage_0.png

var citiesDropDropDown = guideBridge.resolveNode("guide[0].guide1[0].guideRootPanel[0].cities[0]");

       citiesDropDropDown.items = ["San Jose","Santa Clara"];

View solution in original post

0 Replies
workflowuser
Employee
Employee

You have to use GuideBridge api

google for adaptive forms GuideBridge api

in that api  there is resolveNode method to get hold of the field and then set its value

jeevan25597530
Level 1
Level 1

Ya, I went through using resolvenode, but not able to achieve as am not sure how to use.

Sharing a sample code will help alot. Thanks.!

workflowuser
Correct answer by
Employee
Employee

you can get the som expression of the field from the ui

1835934_pastedImage_0.png

var citiesDropDropDown = guideBridge.resolveNode("guide[0].guide1[0].guideRootPanel[0].cities[0]");

       citiesDropDropDown.items = ["San Jose","Santa Clara"];

View solution in original post

Mayank_Gandhi
Community Advisor
Community Advisor

As workflowuser​ mentioned about the using guideBridge API to perform get/set operation. That is the right way to do it. Please test and let us know if you need any help further.

jeevan25597530
Level 1
Level 1

Thanks alot.! It works. Thanks for the code screenshot. Much appreciate your effort.