Page 1 of 1

change value of select field

Posted: Tue May 03, 2016 4:57 am
by Carrie White

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


change value of select field

Posted: Wed May 04, 2016 8:06 am
by Serhii Kulibaba

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


change value of select field

Posted: Wed May 04, 2016 8:38 pm
by Carrie White

perfect. thanks!