Updating adaptive form values from Javascript not retaining

Avatar

Avatar
Validate 1
Level 1
jeevan25597530
Level 1

Like

1 like

Total Posts

3 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 1
jeevan25597530
Level 1

Like

1 like

Total Posts

3 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
Applaud 5
View profile
jeevan25597530
Level 1

19-09-2019

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.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Ignite 5
Employee
workflowuser
Employee

Likes

136 likes

Total Posts

446 posts

Correct reply

70 solutions
Top badges earned
Ignite 5
Ignite 3
Ignite 1
Give Back 50
Give Back 5
View profile

Avatar
Ignite 5
Employee
workflowuser
Employee

Likes

136 likes

Total Posts

446 posts

Correct reply

70 solutions
Top badges earned
Ignite 5
Ignite 3
Ignite 1
Give Back 50
Give Back 5
View profile
workflowuser
Employee

20-09-2019

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"];

Answers (6)

Answers (6)

Avatar

Avatar
Ignite 5
Employee
workflowuser
Employee

Likes

136 likes

Total Posts

446 posts

Correct reply

70 solutions
Top badges earned
Ignite 5
Ignite 3
Ignite 1
Give Back 50
Give Back 5
View profile

Avatar
Ignite 5
Employee
workflowuser
Employee

Likes

136 likes

Total Posts

446 posts

Correct reply

70 solutions
Top badges earned
Ignite 5
Ignite 3
Ignite 1
Give Back 50
Give Back 5
View profile
workflowuser
Employee

20-09-2019

Did you use the code provided?

Avatar

Avatar
Ignite 5
Employee
workflowuser
Employee

Likes

136 likes

Total Posts

446 posts

Correct reply

70 solutions
Top badges earned
Ignite 5
Ignite 3
Ignite 1
Give Back 50
Give Back 5
View profile

Avatar
Ignite 5
Employee
workflowuser
Employee

Likes

136 likes

Total Posts

446 posts

Correct reply

70 solutions
Top badges earned
Ignite 5
Ignite 3
Ignite 1
Give Back 50
Give Back 5
View profile
workflowuser
Employee

20-09-2019

i will  send you sample code soon

Avatar

Avatar
Ignite 5
Employee
workflowuser
Employee

Likes

136 likes

Total Posts

446 posts

Correct reply

70 solutions
Top badges earned
Ignite 5
Ignite 3
Ignite 1
Give Back 50
Give Back 5
View profile

Avatar
Ignite 5
Employee
workflowuser
Employee

Likes

136 likes

Total Posts

446 posts

Correct reply

70 solutions
Top badges earned
Ignite 5
Ignite 3
Ignite 1
Give Back 50
Give Back 5
View profile
workflowuser
Employee

20-09-2019

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

Avatar

Avatar
Validate 1
Level 1
jeevan25597530
Level 1

Like

1 like

Total Posts

3 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 1
jeevan25597530
Level 1

Like

1 like

Total Posts

3 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
Applaud 5
View profile
jeevan25597530
Level 1

02-10-2019

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

Avatar

Avatar
Springboard
Level 10
Mayank_Gandhi
Level 10

Likes

327 likes

Total Posts

1,150 posts

Correct reply

185 solutions
Top badges earned
Springboard
Establish
Validate 1
Contributor 2
Ignite 5
View profile

Avatar
Springboard
Level 10
Mayank_Gandhi
Level 10

Likes

327 likes

Total Posts

1,150 posts

Correct reply

185 solutions
Top badges earned
Springboard
Establish
Validate 1
Contributor 2
Ignite 5
View profile
Mayank_Gandhi
Level 10

23-09-2019

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.

Avatar

Avatar
Validate 1
Level 1
jeevan25597530
Level 1

Like

1 like

Total Posts

3 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 1
jeevan25597530
Level 1

Like

1 like

Total Posts

3 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
Applaud 5
View profile
jeevan25597530
Level 1

20-09-2019

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