1 Reply Latest reply on Oct 6, 2014 3:07 PM by Jeffrey_Smith

    Submit Button Restrictions


      I have used InDesign to create an interactive PDF that is servicing our company as a testimonial release form. Ultimately, I want the submit button to have a restriction in allowing it to be sent only if all other fields are completed. How can I accomplish this?

        • 1. Re: Submit Button Restrictions
          Jeffrey_Smith Most Valuable Participant

          As far as I know, there is no way to accomplish this in Indesign. However, there is away to do this in Acrobat with a validation javascript. The following script would be pasted into the submit button's run javascript action:


          var patternEmpty = /^\s*$/;

          var strMissing = "";

          if(patternEmpty.test(this.getField("name of your field").value))

               strMissing = "name of your field";


            { // All is ok, submit the data

          console.println("All form data ok");



          {// Got an error

          app.alert("Please complete information: " + strMissing);



          Notes: Bold text is specific to your form, and message to appear. You can have multiple actions assigned for a button. If you have 10 fields, then there would be 10 actions, along with the submit function assigned to the submit button. The PDF would return a message for any of the fields left blank before submitting.