4 Replies Latest reply on Dec 11, 2017 7:07 AM by Terbo

    Default text until date entered

    Terbo Level 1

      There used to be a list of simple commonly used lines of code for various actions.  I can't find that list.  Does anyone know where that is?

       

      I have a multi-page pdf.  On the first page, I have a list of important dates.  These dates are based on dates entered elsewhere in the document.  I want to enter default statements in the date fields on page one, for example "Enter Delivery Date on pg 2".  Once they enter the date on page 2, I want that entered date to populate the field on page 1. How do I do all of this?

       

      Message was edited by: Teresa Kassen

        • 1. Re: Default text until date entered
          Thom Parker Adobe Community Professional

          So first, fields with the same names have the same value, so just make the fields you want copied have the same name

           

          For the other bit, unfortunately you have a conundrum. The correct way to display instructional text in a field is with the format event. This event provides an opportunity to change the display of the field without changing the value.  But since you've already selected the Date formatting, this option is not available.

           

          There is no way around this if you want to keep the calendar popup.

           

          But if you don't mind loosing it, There is a way around this, but it's tricky.  First, you have to set the Custom formatting to override the display on an empty field

           

          // Custom Format Script

          if(event.value == "") event.value = "This is my message";

           

          Make sure this works first, Then to get the automatic data popup, you have to enter the built-in JavaScript date function into the custom Keystroke script, with the correct formatting options. Once you do this the Format Tab on Field Properties will revert to Date Formatting.

           

          // Custom Keystroke Script

          AFDate_KeystrokeEx("mm/dd/yy");

          1 person found this helpful
          • 2. Re: Default text until date entered
            Terbo Level 1

            Thank you Thom.  That is well beyond my capability.  I found an alternative, more cluggy way of accomplishing what I need.  It is not elegant, but it works.

            • 3. Re: Default text until date entered
              Thom Parker Adobe Community Professional

              What is it?

              • 4. Re: Default text until date entered
                Terbo Level 1

                I left it blank and put in the permanent text field header the need to enter information on another page. 

                1 person found this helpful