Carrie White
Posts: 0
Joined: Mon Sep 14, 2015 11:29 pm

change value of select field

I have a "select" field. I am able to save in local storage the value selected when the page is hidden, but cannot display the value selected when the page is later shown. I have tried changing the property and also mapping. What would be the javascript code to have the correct value selected upon page show (and not always the default value)?

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

change value of select field

Hello Carrie,

Please use JS below to set the value of the select component:

preApperyio("mySelect").val(newValue).refresh();/pre

here mySelect - the name of the select conponent
newValue - the variable with the new value

Carrie White
Posts: 0
Joined: Mon Sep 14, 2015 11:29 pm

change value of select field

perfect. thanks!

Return to “Issues”