These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Fill Field from check box dialog

ercannaday
Registered: Apr 12 2007
Posts: 2

I have a js dialog pop which includes 7 check boxes. The pop-up was created with AcroDialog.
 
I need to return a maxium of five values to a field named CLSN_INURY_TYPE.
 
I am using Live Cycle Designer 7. The code is as follows:
 
//Acrobat JavaScript Dialog
//Created by DialogDesigner from WindJack Solutions
var Injury_Type =
{
 
result:"cancel",
DoDialog: function(){return app.execDialog(this);},
b0:false,
b1:false,
b2:false,
b3:false,
b4:false,
b5:false,
b9:false,
initialize: function(dialog)
{
var dlgInit =
{
"0": this.b0,
"1": this.b1,
"2": this.b2,
"3": this.b3,
"4": this.b4,
"5": this.b5,
"9": this.b9,
};
dialog.load(dlgInit);
},
commit: function(dialog)
{
var oRslt = dialog.store();
this.b0 = oRslt["0"];
this.b1 = oRslt["1"];
this.b2 = oRslt["2"];
this.b3 = oRslt["3"];
this.b4 = oRslt["4"];
this.b5 = oRslt["5"];
this.b9 = oRslt["9"];
},
description:
{
name: "Enter Injury Type",
elements:
[
{
type: "view",
elements:
[
{
type: "view",
char_width: 8,
char_height: 8,
align_children: "align_left",
elements:
[
{
type: "view",
width: 98,
height: 101,
char_width: 8,
char_height: 8,
align_children: "align_left",
elements:
[
{
type: "check_box",
item_id: "0",
name: "&0 Not Applicable",
width: 122,
height: 23,
},
{
type: "check_box",
item_id: "1",
name: "&1 Head",
},
{
type: "check_box",
item_id: "2",
name: "&2 Trunk-External",
bold: true,
},
{
type: "check_box",
item_id: "3",
name: "&3 Trunk-Internal",
},
{
type: "check_box",
item_id: "4",
name: "&4 Legs",
},
{
type: "check_box",
item_id: "5",
name: "&5 Arms",
},
{
type: "check_box",
item_id: "9",
name: "&9 Unknown",
},
]
},
{
type: "ok",
},
]
},
]
},
]
}
};
 
// Example Code
Injury_Type.b0 = false;
Injury_Type.b1 = false;
Injury_Type.b2 = false;
Injury_Type.b3 = false;
Injury_Type.b4 = false;
Injury_Type.b5 = false;
Injury_Type.b9 = false;
if("ok" == Injury_Type.DoDialog())
{
 
console.println("0:" + Injury_Type.b0);
console.println("1:" + Injury_Type.b1);
console.println("2:" + Injury_Type.b2);
console.println("3:" + Injury_Type.b3);
console.println("4:" + Injury_Type.b4);
console.println("5:" + Injury_Type.b5);
console.println("9:" + Injury_Type.b9);
}

My Product Information:
Acrobat Pro 7.0.9, Windows
Dimitri
Expert
Registered: Nov 1 2005
Posts: 1389
Hi ercannaday,

It may be best to contact WindJack Solutions directly for an answer to your question regarding AcroDialogs code (support [at] windjack [dot] com).Hope that helps,

Dimitri
WindJack Solutions
[url=http://www.windjack.com]www.windjack.com[/url]