1 Reply Latest reply on Jul 13, 2013 3:51 AM by try67

    SyntaxError: missing : after property id 28: at line 29

    LPim1

      I used an example code and edited it to what I thought I needed.  Basically at the time I place a stamp on a document I wanted a dialog box to prompt the fields that need to be filled in.  Essentially I wanted an interactive stamp. 

       

      I found a sample that did exactly that but I needed completely different field (Prelim#, Page/Pages, Release Date-automatic to current date).  I anticipated filling in only the prelim# and page #'s before the stamp is applied to the document but I keep getting the subject error message and I'm not changing that part of the code at all.  Does someone know how to fix this?  I don't know how to write code (the whole thing could be off for all I know) and have been strictly building these documents based on what I find here so anyones help is super appreciated.  Here's my code and the stamp:

       

      //-------------------------------------------------------------
      //-----------------Do not edit the XML tags--------------------
      //-------------------------------------------------------------

      //<Document-Level>
      //<ACRO_source>StampCode</ACRO_source>
      //<ACRO_script>
      /*********** belongs to: Document-Level:StampCode ***********/
      var builder =
      {
      // These map to Text Fields in the Stamp
      textBoxes :
      [
        { field:"Date", description:"Release Date:", default:function()
         { 
          var curDate = new Date();
          return (curDate.getMonth() + 1) + "/" + curDate.getDate() + "/" + curDate.getFullYear();
         }
        },
        { field:"Prelim#", description:"Prelim #:", default:function() { return ""; } },
        { field:"Page", description:"Page:", default:function() { return ""; } },
        { field:"Page(s)", description:"Page(s):", default:function() { return ""; } }   
      ],
      /*********** belongs to: AcroForm:Calculation:Calculate ***********/
      // WARNING: DO NOT EDIT
      // SEE GLOBAL JAVASCRIPT SECTION FOR CUSTOMIZATION

      if (event.source.forReal)
      {
        var stampDialog = CreateDialog(builder);
      app.execDialog(stampDialog);

      sd.description =
      {
        name: "Stamp Dialog",
        elements:
        [
         {
          type: "view",
          align_children: "align_fill",
          elements:
          [
           stateCluster,
           optionsCluster
          ]
         },
         {
          type: "ok"
         }
        ]
      };

      return sd;
      }
      //</ACRO_script>
      //</AcroForm>

       

      PrelimQ.png