Updating adaptive form values from Javascript not retaining | Community
Skip to main content
jeevan25597530
New Participant
Sep 20, 2019 6:55 AM UTC
Solved

Updating adaptive form values from Javascript not retaining

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
workflowuserAccepted solution
Employee
Sep 20, 2019 4:57 PM UTC

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

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

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

7 replies

jeevan25597530
New Participant
Oct 3, 2019 6:17 AM UTC

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

Translate
Mayank_Gandhi
Employee
Sep 23, 2019 1:45 PM UTC

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.

Translate
Employee
Sep 20, 2019 7:08 PM UTC

Did you use the code provided?

Translate
workflowuserAccepted solution
Employee
Sep 20, 2019 4:57 PM UTC

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

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

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

Translate
jeevan25597530
New Participant
Sep 20, 2019 3:49 PM UTC

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.!

Translate
Employee
Sep 20, 2019 1:50 PM UTC

i will  send you sample code soon

Translate
Employee
Sep 20, 2019 1:46 PM UTC

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

Translate