AcroDialog Popup List update/store value
Hello dear community. I am trying to update or save the value from the previous selection in the pop-up list. The "Name" and "Surname" fields are fine, but the pop-up list ("Title") is not. Can anyone help me with this? When the user clicks the button, the value from the previous selection should be displayed. Any help would be appreciated.

list_Titl = {"--Select--":-1,"Ms":-1,"Mrs":-1,"Mr":-1};
var oDlg = {
strTitle:null,
strEdt1:null,
strEdt2:null,
GetListSel:function(oLst){for(var x in oLst){if(oLst[x]>0)return x;}return null;},
initialize:function(dialog){
var oInit = {
Titl:this.strTitle,
Name:this.strEdt1,
Snam:this.strEdt2,
Titl:list_Titl
};
dialog.load(oInit);
},
validate:function(dialog){
var bRtn = true;
var oRslt = dialog.store();
return bRtn;
},
commit:function(dialog){
var oRslt = dialog.store();
this.strTitle = this.GetListSel(oRslt.Titl);
this.strEdt1 = oRslt.Name;
this.strEdt2 = oRslt.Snam;
},
description:{
name:"Dialog Box",
elements:[{type:"view",elements:[
{
type:"view",
item_id:"Vew1",
alignment:"align_fill",
align_children:"align_left",
elements:[
{
type:"static_text",
item_id:"Sta1",
name:"Title",
},
{
type:"popup",
item_id:"Titl",
alignment:"align_fill",
},
{
type:"static_text",
item_id:"Sta2",
name:"Name",
},
{
type:"edit_text",
item_id:"Name",
width:35,
alignment:"align_fill",
},
{
type:"static_text",
item_id:"Sta3",
name:"Surname",
},
{
type:"edit_text",
item_id:"Snam",
width:35,
alignment:"align_fill",
},
],
},
{
type:"ok_cancel",
},
]}]
}
};
oDlg.strTitle = this.getField("Title").value;
oDlg.strEdt1 = this.getField("Surname").value;
oDlg.strEdt2 = this.getField("Name").value;
if ("ok" == app.execDialog(oDlg)) {
this.getField("Title").value = oDlg.strTitle;
this.getField("Surname").value = oDlg.strEdt1;
this.getField("Name").value = oDlg.strEdt2;
}
