4 Replies Latest reply on Mar 26, 2013 12:15 AM by Nickboy1965

    Autocomplete

    Nickboy1965

      Hi Sorry to ask such a basic question, i'm new to the world of creating PDF Documents.

      I have tried searching before posting this question as i couldn't seem to find a satisfactory answer.

       

      I want to be able to autocomplete a number of fields based on the contents that a user enters in one of the fields ( in this case an audit no )

      So  I set up two fields to test it

      Text1 and text2

      lookling at some answers on the we i came up with:

       

      Under custom calculation script of  text1's property box i've got:

       

      this.getField("text2").value = this.getField("text1").value;

       

      but nothing happens!

       

      any help would be greatly appreciated

       

      thanks

       

      Nick

        • 1. Re: Autocomplete
          gkaiseril MVP & Adobe Community Professional

          While you are within a field the access to the field's properties and methods is by use of the "event" object.

           

          this.getField("text2").value = event.value;

           

          If I were setting another field from the current field, I wold us the "On Blur" action so the calculation is not repeated when any field used in any calculation is updated. On a large complex form this could improve performance.

          • 2. Re: Autocomplete
            Nickboy1965 Level 1

            thanks for the reply

             

            So if i put this:

            this.getField("text2").value = event.value;

             

            in the "on blur" event of text1 why does nothing happen?

            • 3. Re: Autocomplete
              gkaiseril MVP & Adobe Community Professional

              You have to update the field and tab out of the field to trigger the "On Blur" or exit actilon.

              • 4. Re: Autocomplete
                Nickboy1965 Level 1

                I know, it still doesn't update the field.

                 

                I have dicovered the duplicate field option which appears to update all instances of the field with the same name followed by a  #and a number.

                 

                vba is so more dependable....

                thank you for your time