30 Replies Latest reply on Mar 14, 2018 2:24 PM by meriçg75308842

    Dynamic Stamp with multiple input from option buttons to be filled into the checkbox!

    arunas36741820

      I'm trying the below code to get a stamp with the multiple input. Based on the selection of option buttons, I require the stamp to be updated. I'm unable to find the error. Could someone help pl.

        • 1. Re: Dynamic Stamp with multiple input from option buttons to be filled into the checkbox!
          arunas36741820 Level 1

          if(event.source.forReal && (event.source.stampName == "#pfP__PjJ7SwG7RRWsGspWA"))

          {

          if ("ok" == app.execDialog(DiaBox))

          {

          this.getField("Approved - Submit Final Copies").checkThisBox(0, DiaBox.bChk1);

          this.getField("Approved as commented - Resubmit").checkThisBox(0, DiaBox.bChk2);

          this.getField("Not Approved - Resubmit").checkThisBox(0, DiaBox.bChk3);

          this.getField("Cleared for Manufacture").checkThisBox(0, DiaBox.bChk4);

          this.getField("For Information").checkThisBox(0, DiaBox.bChk5);

           

          var cMsg = DiaBox.byName;

          event.value = "Remarks # " + cMsg;

          event.source.source.info.exhibit = cMsg;

          }

          }

           

          var DiaBox =

          {

           

          result:"cancel",

          DoDialog: function(){return app.execDialog(this);},

          bChk1:true,

          bChk2:false,

          bChk3:false,

          bChk4:false,

          bChk5:false,

          stredt1:"",

          initialize: function(dialog)

          {

          var dlgInit =

          {

          "Chk1": this.bChk1,

          "Chk2": this.bChk2,

          "Chk3": this.bChk3,

          "Chk4": this.bChk4,

          "Chk5": this.bChk5,

          "Name": this.stredt1,

          };

          dialog.load(dlgInit);

          },

          commit: function(dialog)

          {

          var oRslt = dialog.store();

          this.bChk1 = oRslt["Chk1"];

          this.bChk2 = oRslt["Chk2"];

          this.bChk3 = oRslt["Chk3"];

          this.bChk4 = oRslt["Chk4"];

          this.bChk5 = oRslt["Chk5"];

          this.byName = oRslt["Name"];

          },

          description:

          {

          name: "Stamp",

          elements:

          [

          {

          type: "view", elements:

          [

          {

          type: "view",

          char_height: 10,

          elements:

          [

          {

          type: "static_text",

          item_id: "stat",

          name: "Please select the review category:",

          width: 152,

          height: 23,

          char_width: 15,

          alignment: "align_fill",

          font: "dialog",

          },

          {

          type: "radio",

          item_id: "Chk1",

          group_id: "rado",

          name: "Approved - Submit Final Copies",

          },

          {

          type: "radio",

          item_id: "Chk2",

          group_id: "rado",

          name: "Approved as commented - Resubmit",

          },

          {

          type: "radio",

          item_id: "Chk3",

          group_id: "rado",

          name: "Not Approved - Resubmit",

          },

          {

          type: "radio",

          item_id: "Chk4",

          group_id: "rado",

          name: "Cleared for Manufacture",

          },

          {

          type: "radio",

          item_id: "Chk5",

          group_id: "rado",

          name: "For Information",

          },

          { type: "edit_text",

          item_id: "Name",

          height: 23,

          char_width: 20,

          char_height: 10,

          alignment: "align_center",

          name: "Enter Initials",

          }

          ]

          },

          {

          type: "ok_cancel",

          },

          ]

          },

          ]

          }

          };

          • 2. Re: Dynamic Stamp with multiple input from option buttons to be filled into the checkbox!
            arunas36741820 Level 1

            The above code is working only if my source stamp file is open first before the pdf in which I want to stamp is open. if the source stamp file is not open, the pop up box for input is not opening! it directly applies the seal on PDF without taking the user input

            • 3. Re: Dynamic Stamp with multiple input from option buttons to be filled into the checkbox!
              try67 MVP & Adobe Community Professional

              Where did you place this code? Are you sure you're using the correct stampName value?

              • 4. Re: Dynamic Stamp with multiple input from option buttons to be filled into the checkbox!
                arunas36741820 Level 1

                Yes! I have rechecked the stamp name. and I have placed the code in custom calculation script of one text box... textbox2.

                • 5. Re: Dynamic Stamp with multiple input from option buttons to be filled into the checkbox!
                  try67 MVP & Adobe Community Professional

                  Sorry for insisting, but this is crucial... How did you check the stamp name?

                  • 6. Re: Dynamic Stamp with multiple input from option buttons to be filled into the checkbox!
                    gkaiseril MVP & Adobe Community Professional

                    There is only one stamp name , that is one used by JavaScript, and then there is the stamp user label that one sees displayed by the UI.

                     

                    Dynamic stamp secrets using JavaScript and Acrobat XI by Thom Parker

                    • 7. Re: Dynamic Stamp with multiple input from option buttons to be filled into the checkbox!
                      arunas36741820 Level 1

                      I placed the stamp on PDF and ... in console I gave the    this.selectedAnnots[0].AP  ....

                      this is the stamp name

                      #pfP__PjJ7SwG7RRWsGspWA ...

                      • 8. Re: Dynamic Stamp with multiple input from option buttons to be filled into the checkbox!
                        try67 MVP & Adobe Community Professional

                        OK, that's fine.

                         

                        I think the issue is that you defined the dialog object after the code where you're calling it. You should move the definition of DiaBox to the top of the code.

                        • 9. Re: Dynamic Stamp with multiple input from option buttons to be filled into the checkbox!
                          arunas36741820 Level 1

                          Thank you soo much, it worked when I changed the order!!! cool

                          • 10. Re: Dynamic Stamp with multiple input from option buttons to be filled into the checkbox!
                            arunas36741820 Level 1

                            So the final code that worked....

                             

                             

                            var DiaBox =

                            {

                            result:"cancel",

                            DoDialog: function(){return app.execDialog(this);},

                            bChk1:false,

                            bChk2:false,

                            bChk3:false,

                            bChk4:false,

                            bChk5:false,

                            stredt1:"",

                            initialize: function(dialog)

                            {

                            var dlgInit =

                            {

                            "Opt1": this.bChk1,

                            "Opt2": this.bChk2,

                            "Opt3": this.bChk3,

                            "Opt4": this.bChk4,

                            "Opt5": this.bChk5,

                            "Name": this.stredt1,

                            };

                            dialog.load(dlgInit);

                            },

                            commit: function(dialog)

                            {

                            var oRslt = dialog.store();

                            this.bChk1 = oRslt["Opt1"];

                            this.bChk2 = oRslt["Opt2"];

                            this.bChk3 = oRslt["Opt3"];

                            this.bChk4 = oRslt["Opt4"];

                            this.bChk5 = oRslt["Opt5"];

                            this.byName = oRslt["Name"];

                            },

                            description:

                            {

                            name: "Stamp",

                            elements:

                            [

                            {

                            type: "view",

                            elements:

                            [

                            {

                            type: "view",

                            char_height: 10,

                            elements:

                            [

                            {

                            type: "static_text",

                            item_id: "stat",

                            name: "Please select the review category:",

                            width: 152,

                            height: 23,

                            char_width: 15,

                            alignment: "align_fill",

                            font: "dialog",

                            },

                            {

                            type: "radio",

                            item_id: "Opt1",

                            group_id: "rado",

                            name: "Approved - Submit Final Copies",

                            },

                            {

                            type: "radio",

                            item_id: "Opt2",

                            group_id: "rado",

                            name: "Approved as commented - Resubmit",

                            },

                            {

                            type: "radio",

                            item_id: "Opt3",

                            group_id: "rado",

                            name: "Not Approved - Resubmit",

                            },

                            {

                            type: "radio",

                            item_id: "Opt4",

                            group_id: "rado",

                            name: "Cleared for Manufacture",

                            },

                            {

                            type: "radio",

                            item_id: "Opt5",

                            group_id: "rado",

                            name: "For Information",

                            },

                            {

                            type: "edit_text",

                            item_id: "Name",

                            height: 35,

                            char_width: 20,

                            char_height: 10,

                            alignment: "align_center",

                            name: "Enter Comments",

                            }

                            ]

                            },

                            {

                            type: "gap",    //Add a small vertical gap between

                            height: 10      //..radio fields and buttons

                            },

                            {

                            type: "ok_cancel",

                            },

                            ]

                            },

                            ]

                            }

                            };

                            if(event.source.forReal && (event.source.stampName == "#pfP__PjJ7SwG7RRWsGspWA"))

                            {

                            if ("ok" == app.execDialog(DiaBox))

                            {

                            this.getField("Text3").value = ((!identity.name || identity.loginName != (event.source.source || this).Collab.user) ? (event.source.source || this).Collab.user : identity.name);

                            this.getField("Text1").value = util.printd("h:MM tt,dd-mmm-yyyy", new Date());

                            this.getField("cbx1").checkThisBox(0, DiaBox.bChk1);

                            this.getField("cbx2").checkThisBox(0, DiaBox.bChk2);

                            this.getField("cbx3").checkThisBox(0, DiaBox.bChk3);

                            this.getField("cbx4").checkThisBox(0, DiaBox.bChk4);

                            this.getField("cbx5").checkThisBox(0, DiaBox.bChk5);

                             

                            console.println("Success1");

                            var cMsg = DiaBox.byName;

                            event.value = "Comment # " + cMsg;

                            event.source.source.info.exhibit = cMsg;

                             

                            }

                             

                            }

                            • 11. Re: Dynamic Stamp with multiple input from option buttons to be filled into the checkbox!
                              armies19630736

                              I tried to follow this solution but mine doesn't populate the radio button selection onto the actual stamp. It will be print the info on By: and Date: but the rest will not populated. Please help. My code is  below.

                               

                              var DiaBox =

                              {

                              result:"cancel",

                              DoDialog: function()

                              {return app.execDialog(this);

                              },

                              bChk1:false,

                              bChk2:false,

                              bChk3:false,

                              bChk4:false,

                              stredt1:"",

                              initialize: function(dialog)

                              {

                              var dlgInit =

                              {

                              "Choice1": this.bChk1,

                              "Choice2": this.bChk2,

                              "Choice3": this.bChk3,

                              "Choice4": this.bChk4,

                              "Comment": this.stredt1,

                              };

                              dialog.load(dlgInit);

                              },

                              commit: function(dialog)

                              {

                              var results = dialog.store();

                              this.bChk1 = results["Choice1"];

                              this.bChk2 = results["Choice2"];

                              this.bChk3 = results["Choice3"];

                              this.bChk4 = results["Choice4"];

                              this.byName = results["Name"];

                              },

                              description:

                              {

                              name: "stamp1",

                              elements:

                              [

                              {

                              type: "view",

                              elements:

                              [

                              {

                              type: "view",

                              char_height: 10,

                              elements:

                              [

                              {

                              type: "static_text",

                              item_id: "stat",

                              name: "Please select the review category:",

                              width: 152,

                              height: 23,

                              char_width: 15,

                              alignment: "align_fill",

                              font: "dialog",

                              },

                              {

                              type: "radio",

                              item_id: "Choice1",

                              group_id: "Group1",

                              name: "Reviewed",

                              },

                              {

                              type: "radio",

                              item_id: "Choice2",

                              group_id: "Group1",

                              name: "Reviewed with changes noted",

                              },

                              {

                              type: "radio",

                              item_id: "Choice3",

                              group_id: "Group1",

                              name: "Revise and Resubmit",

                              },

                              {

                              type: "radio",

                              item_id: "Choice4",

                              group_id: "Group1",

                              name: "Rejected",

                              },

                              {

                              type: "edit_text",

                              item_id: "Name",

                              height: 35,

                              char_width: 20,

                              char_height: 10,

                              alignment: "align_center",

                              name: "Enter Comments",

                              }

                              ]

                              },

                              {

                              type: "gap",    //Add a small vertical gap between

                              height: 10      //..radio fields and buttons

                              },

                              {

                              type: "ok_cancel",

                              },

                              ]

                              },

                              ]

                              }

                              };

                              if(event.source.forReal && (event.source.stampName == "#stamp1"))

                              {

                              if ("ok" == app.execDialog(DiaBox))

                              {

                              this.getField("By").value = ((!identity.name || identity.loginName != (event.source.source || this).Collab.user) ? (event.source.source || this).Collab.user : identity.name);

                              this.getField("Date").value = util.printd("h:MM tt,dd-mmm-yyyy", new Date());

                              this.getField("Comment").value = results["Name"];

                              this.getField("rado1").checkThisBox(0, DiaBox.bChk1);

                              this.getField("cbx2").checkThisBox(0, DiaBox.bChk2);

                              this.getField("cbx3").checkThisBox(0, DiaBox.bChk3);

                              this.getField("cbx4").checkThisBox(0, DiaBox.bChk4);

                              console.println("Stamp Name: " + event.source.stampName);

                              var cMsg = DiaBox.byName;

                              event.value = "Comment # " + cMsg;

                              event.source.source.info.exhibit = cMsg;

                               

                               

                              }

                              }

                              • 12. Re: Dynamic Stamp with multiple input from option buttons to be filled into the checkbox!
                                Karl Heinz Kremer Adobe Community Professional

                                The item ID can only be four letters long. You are using for example "Choice4" - this will not work.

                                • 13. Re: Dynamic Stamp with multiple input from option buttons to be filled into the checkbox!
                                  armies19630736 Level 1

                                  I edited it and changed it to "Btn1" and so on. Still not transferring the selection from the dialog box onto the stamp

                                  var DiaBox =

                                  {

                                  result:"cancel",

                                  DoDialog: function()

                                  {return app.execDialog(this);

                                  },

                                  bChk1:false,

                                  bChk2:false,

                                  bChk3:false,

                                  bChk4:false,

                                  stredt1:"",

                                  initialize: function(dialog)

                                  {

                                  var dlgInit =

                                  {

                                  "Btn1": this.bChk1,

                                  "Btn2": this.bChk2,

                                  "Btn3": this.bChk3,

                                  "Btn4": this.bChk4,

                                  "Name": this.stredt1,

                                  };

                                  dialog.load(dlgInit);

                                  },

                                  commit: function(dialog)

                                  {

                                  var results = dialog.store();

                                  this.bChk1 = results["Btn1"];

                                  this.bChk2 = results["Btn2"];

                                  this.bChk3 = results["Btn3"];

                                  this.bChk4 = results["Btn4"];

                                  this.byName = results["Name"];

                                  },

                                  description:

                                  {

                                  name: "stamp1",

                                  elements:

                                  [

                                  {

                                  type: "view",

                                  elements:

                                  [

                                  {

                                  type: "view",

                                  char_height: 10,

                                  elements:

                                  [

                                  {

                                  type: "static_text",

                                  item_id: "stat",

                                  name: "Please select the review category:",

                                  width: 152,

                                  height: 23,

                                  char_width: 15,

                                  alignment: "align_fill",

                                  font: "dialog",

                                  },

                                  {

                                  type: "radio",

                                  item_id: "Btn1",

                                  group_id: "Group1",

                                  name: "Reviewed",

                                  },

                                  {

                                  type: "radio",

                                  item_id: "Btn2",

                                  group_id: "Group1",

                                  name: "Reviewed with changes noted",

                                  },

                                  {

                                  type: "radio",

                                  item_id: "Btn3",

                                  group_id: "Group1",

                                  name: "Revise and Resubmit",

                                  },

                                  {

                                  type: "radio",

                                  item_id: "Btn4",

                                  group_id: "Group1",

                                  name: "Rejected",

                                  },

                                  {

                                  type: "edit_text",

                                  item_id: "Name",

                                  height: 35,

                                  char_width: 20,

                                  char_height: 10,

                                  alignment: "align_center",

                                  name: "Enter Comments",

                                  }

                                  ]

                                  },

                                  {

                                  type: "gap",    //Add a small vertical gap between

                                  height: 10      //..radio fields and buttons

                                  },

                                  {

                                  type: "ok_cancel",

                                  },

                                  ]

                                  },

                                  ]

                                  }

                                  };

                                  if(event.source.forReal && (event.source.stampName == "#stamp1"))

                                  {

                                  if ("ok" == app.execDialog(DiaBox))

                                  {

                                  this.getField("By").value = ((!identity.name || identity.loginName != (event.source.source || this).Collab.user) ? (event.source.source || this).Collab.user : identity.name);

                                  this.getField("Date").value = util.printd("h:MM tt,dd-mmm-yyyy", new Date());

                                  this.getField("Comment").value = this.byName;

                                  this.getField("cbx1").checkThisBox(0, DiaBox.bChk1);

                                  this.getField("cbx2").checkThisBox(0, DiaBox.bChk2);

                                  this.getField("cbx3").checkThisBox(0, DiaBox.bChk3);

                                  this.getField("cbx4").checkThisBox(0, DiaBox.bChk4);

                                  console.println("Stamp Name: " + event.source.stampName);

                                  var cMsg = DiaBox.byName;

                                  event.value = "Name " + cMsg;

                                  event.source.source.info.exhibit = cMsg;

                                   

                                   

                                  }

                                  }

                                  • 14. Re: Dynamic Stamp with multiple input from option buttons to be filled into the checkbox!
                                    Karl Heinz Kremer Adobe Community Professional

                                    Are you getting any error messages on the JavaScript console?

                                    • 15. Re: Dynamic Stamp with multiple input from option buttons to be filled into the checkbox!
                                      armies19630736 Level 1

                                      I have an error :

                                      TypeError: this.getField(...) is null

                                      115:App:Calculate

                                      • 16. Re: Dynamic Stamp with multiple input from option buttons to be filled into the checkbox!
                                        Karl Heinz Kremer Adobe Community Professional

                                        Check your line #115, you are trying to reference a field that does not

                                        exist.

                                        • 17. Re: Dynamic Stamp with multiple input from option buttons to be filled into the checkbox!
                                          armies19630736 Level 1

                                          Okay, I've fixed the error on line #115 but now I have these errors ( see below) . and line 125 is this this.getField("Btn1").checkThisBox(0, DiaBox.bChk1);

                                           

                                          Btn 1 thru Btn4 is the item_id of each of my radio button

                                           

                                           

                                          TypeError: this.getField(...) is null

                                          125:App:Calculate

                                          TypeError: event.source is null

                                          116:Field:Calculate

                                          TypeError: this.getField(...) is null

                                          125:App:Calculate

                                          TypeError: event.source is null

                                          116:Field:Calculate

                                          TypeError: event.source is null

                                          116:Field:Calculate

                                          • 18. Re: Dynamic Stamp with multiple input from option buttons to be filled into the checkbox!
                                            try67 MVP & Adobe Community Professional

                                            "stamp1" can't be the name of your stamp. You need to find out the internal AP name.

                                            Also, change this line:

                                            if (event.source.forReal && (event.source.stampName == "#stamp1")) {

                                            to:

                                            if (event.source && event.source.forReal && (event.source.stampName == "#stamp1")) {

                                            • 20. Re: Dynamic Stamp with multiple input from option buttons to be filled into the checkbox!
                                              try67 MVP & Adobe Community Professional

                                              It's a property of the stamp. To find it out apply your stamp to a page, select it with the mouse, and then run this code from the JS Console:

                                              this.selectedAnnots[0].AP

                                              This is the value you need to use as the stampName in your code.

                                              • 22. Re: Dynamic Stamp with multiple input from option buttons to be filled into the checkbox!
                                                armies19630736 Level 1

                                                the name of my stamp is #stamp1 because I named it that way.

                                                • 23. Re: Dynamic Stamp with multiple input from option buttons to be filled into the checkbox!
                                                  armies19630736 Level 1

                                                  My problem or error is this statement this.getField("Btn1").checkThisBox(0,DiaBox.bChk1);

                                                   

                                                  it's giving me an error of NULL and I don't understand why

                                                  • 25. Re: Dynamic Stamp with multiple input from option buttons to be filled into the checkbox!
                                                    armies19630736 Level 1

                                                    sorry, I have another problem. How do I reset the check mark every time the stamp is applied. Right now once the first selection was checked every time I re-apply the stamp it is defaulted to the first selection that I had made (

                                                    • 26. Re: Dynamic Stamp with multiple input from option buttons to be filled into the checkbox!
                                                      try67 MVP & Adobe Community Professional

                                                      That means there's no field with that name in your file.

                                                      • 27. Re: Dynamic Stamp with multiple input from option buttons to be filled into the checkbox!
                                                        try67 MVP & Adobe Community Professional

                                                        After this line:

                                                        if (event.source.forReal && (event.source.stampName == "#stamp1")) {

                                                        Add this:

                                                        this.resetForm();

                                                        • 29. Re: Dynamic Stamp with multiple input from option buttons to be filled into the checkbox!
                                                          armies19630736 Level 1

                                                          It is only recognizing the first radio button no matter which button I select, it will only check the first radio button

                                                          • 30. Re: Dynamic Stamp with multiple input from option buttons to be filled into the checkbox!
                                                            meriçg75308842

                                                            Can you try that

                                                            var DiaBox =

                                                            {

                                                            result:"cancel",

                                                            DoDialog: function()

                                                            {return app.execDialog(this);

                                                            },

                                                            bChk1:false,

                                                            bChk2:false,

                                                            bChk3:false,

                                                            bChk4:false,

                                                            stredt1:"",

                                                            initialize: function(dialog)

                                                            {

                                                            var dlgInit =

                                                            {

                                                            "Btn1": this.bChk1,

                                                            "Btn2": this.bChk2,

                                                            "Btn3": this.bChk3,

                                                            "Btn4": this.bChk4,

                                                            "Name": this.stredt1,

                                                            };

                                                            dialog.load(dlgInit);

                                                            },

                                                            commit: function(dialog)

                                                            {

                                                            var results = dialog.store();

                                                            this.bChk1 = results["Btn1"];

                                                            this.bChk2 = results["Btn2"];

                                                            this.bChk3 = results["Btn3"];

                                                            this.bChk4 = results["Btn4"];

                                                            this.byName = results["Name"];

                                                            },

                                                            description:

                                                            {

                                                            name: "stamp1",

                                                            elements:

                                                            [

                                                            {

                                                            type: "view",

                                                            elements:

                                                            [

                                                            {

                                                            type: "view",

                                                            char_height: 10,

                                                            elements:

                                                            [

                                                            {

                                                            type: "static_text",

                                                            item_id: "stat",

                                                            name: "Please select the review category:",

                                                            width: 152,

                                                            height: 23,

                                                            char_width: 15,

                                                            alignment: "align_fill",

                                                            font: "dialog",

                                                            },

                                                            {

                                                            type: "radio",

                                                            item_id: "Btn1",

                                                            group_id: "Group1",

                                                            name: "Reviewed",

                                                            },

                                                            {

                                                            type: "radio",

                                                            item_id: "Btn2",

                                                            group_id: "Group1",

                                                            name: "Reviewed with changes noted",

                                                            },

                                                            {

                                                            type: "radio",

                                                            item_id: "Btn3",

                                                            group_id: "Group1",

                                                            name: "Revise and Resubmit",

                                                            },

                                                            {

                                                            type: "radio",

                                                            item_id: "Btn4",

                                                            group_id: "Group1",

                                                            name: "Rejected",

                                                            },

                                                            {

                                                            type: kas geliştirme "edit_text",

                                                            item_id: "Name",

                                                            height: 35,

                                                            char_width: 20,

                                                            char_height: 10,

                                                            alignment: "align_center",

                                                            name: "Enter Comments",

                                                            }

                                                            ]

                                                            },

                                                            {

                                                            type: "gap",    //Add a small vertical gap between

                                                            height: 10      //..radio fields and buttons

                                                            },

                                                            {

                                                            type: "ok_cancel",

                                                            },

                                                            ]

                                                            },

                                                            ]

                                                            }

                                                            };

                                                            if(event.source.forReal && (event.source.stampName == "#stamp1"))

                                                            {

                                                            if ("ok" == app.execDialog(DiaBox))

                                                            {

                                                            this.getField("By").value = ((!identity.name || identity.loginName != (event.source.source || this).Collab.user) ? (event.source.source || this).Collab.user : identity.name);

                                                            this.getField("Date").value = util.printd("h:MM tt,dd-mmm-yyyy", new Date());

                                                            this.getField("Comment").value = this.byName;

                                                            this.getField("cbx1").checkThisBox(0, DiaBox.bChk1);

                                                            this.getField("cbx2").checkThisBox(0, DiaBox.bChk2);

                                                            this.getField("cbx3").checkThisBox(0, DiaBox.bChk3);

                                                            this.getField("cbx4").checkThisBox(0, DiaBox.bChk4);

                                                            console.println("Stamp Name: " + event.source.stampName);

                                                            var cMsg = DiaBox.byName;

                                                            event.value = "Name " + cMsg;

                                                            event.source.source.info.exhibit = cMsg;

                                                             

                                                             

                                                            }

                                                            }

                                                            • 31. Re: Dynamic Stamp with multiple input from option buttons to be filled into the checkbox!
                                                              armies19630736 Level 1

                                                              FINALLY!!! Here is the final code that works for me.

                                                               

                                                              var DiaBox =

                                                              {

                                                                  result:"cancel",

                                                                  DoDialog: function()

                                                              {

                                                                  return app.execDialog(this);

                                                              },

                                                                  bChk1:false,

                                                                  bChk2:false,

                                                                  bChk3:false,

                                                                  bChk4:false,

                                                                  stredt1:"",

                                                                  initialize: function(dialog)

                                                              {

                                                                  var dlgInit =

                                                              {

                                                                  "Btn1": this.bChk1,

                                                                  "Btn2": this.bChk2,

                                                                  "Btn3": this.bChk3,

                                                                  "Btn4": this.bChk4,

                                                                  "Name": this.stredt1,

                                                              };

                                                                  dialog.load(dlgInit);

                                                              },

                                                                  commit: function(dialog)

                                                              {

                                                                  var results = dialog.store();

                                                                  this.bChk1 = results["Btn1"];

                                                                  this.bChk2 = results["Btn2"];

                                                                  this.bChk3 = results["Btn3"];

                                                                  this.bChk4 = results["Btn4"];

                                                                  this.byName = results["Name"];

                                                                  this.stredt1 = results["Name"];

                                                              },

                                                                  description:

                                                              {

                                                                  name: "#stamp1",

                                                                  elements:

                                                                  [

                                                              {

                                                                  type: "view",

                                                                  elements:

                                                              [

                                                              {

                                                                  type: "view",

                                                                  char_height: 10,

                                                                  elements:

                                                                  [

                                                              {

                                                                  type: "static_text",

                                                                  item_id: "stat",

                                                                  name: "SELECT THE REVIEW CATEGORY:",

                                                                  width: 152,

                                                                  height: 23,

                                                                  char_width: 15,

                                                                  alignment: "align_fill",

                                                                  font: "dialog",

                                                              },

                                                              {

                                                                  type: "radio",

                                                                  item_id: "Btn1",

                                                                  group_id: "Group1",

                                                                  name: "Reviewed",

                                                              },

                                                              {

                                                                  type: "radio",

                                                                  item_id: "Btn2",

                                                                  group_id: "Group1",

                                                                  name: "Reviewed with changes noted",

                                                              },

                                                              {

                                                                  type: "radio",

                                                                  item_id: "Btn3",

                                                                  group_id: "Group1",

                                                                  name: "Revise and Resubmit",

                                                                  },

                                                              {

                                                                  type: "radio",

                                                                  item_id: "Btn4",

                                                                  group_id: "Group1",

                                                                  name: "Rejected",

                                                              },

                                                               

                                                               

                                                              {

                                                                  type: "static_text",

                                                                  item_id: "stat2",

                                                                  name: "ENTER REJECTION COMMENTS:",

                                                                  width: 152,

                                                                  height: 23,

                                                                  char_width: 15,

                                                                  alignment: "align_fill",

                                                                  font: "dialog",

                                                              },

                                                               

                                                               

                                                              {

                                                                  type: "edit_text",

                                                                  item_id: "Name",

                                                                  height: 35,

                                                                  char_width: 20,

                                                                  char_height: 10,

                                                                  alignment: "align_center",

                                                                  name: "Comments",

                                                              }

                                                              ]

                                                              },

                                                               

                                                               

                                                              {

                                                                  type: "ok_cancel",

                                                              },

                                                              ]

                                                              },

                                                              ]

                                                              }

                                                              };

                                                              this.resetForm();

                                                               

                                                               

                                                              if (event.source && event.source.forReal && (event.source.stampName == "#stamp1"))

                                                                  {

                                                                  if ("ok" == app.execDialog(DiaBox))

                                                                  this.getField("By").value = ((!identity.name || identity.loginName !=     (event.source.source || this).Collab.user) ? (event.source.source || this).Collab.user : identity.name);

                                                               

                                                               

                                                                  this.getField("Date").value = util.printd("h:MM tt,dd-mmm-yyyy", new Date());

                                                                 

                                                                  this.getField("Comment").value = DiaBox.stredt1;

                                                                  this.getField("Group1","Btn1").checkThisBox(0,DiaBox.bChk1);

                                                                  this.getField("Group2","Btn2").checkThisBox(0,DiaBox.bChk2);

                                                                  this.getField("Group3","Btn3").checkThisBox(0,DiaBox.bChk3);

                                                                  this.getField("Group4","Btn4").checkThisBox(0,DiaBox.bChk4);

                                                                 

                                                                  var cMsg = this.stredt1;

                                                                  event.value = cMsg;

                                                                  event.source.source.info.exhibit = cMsg;

                                                              }

                                                              }