8 Replies Latest reply on Aug 16, 2013 8:55 PM by George_Johnson

    Form field Continued on page 3

    daxcastro

      I have a 3 page document. On page 1 there is a multi-line text field. It has a fixed box area that fits my layout. I want the form to automatically bounce the user to page three and keep the text going when the reach the end of page 1.


      I did do some research and found:

       

      if ( event.fieldFull || event.willCommit )

      this.getField('NextTabField').setFocus();

       

      But this is not what I need. I have three different blocks of text that need to continue on three other blocks each individual. So I think I need the script to call out the ID of the box and then have three scripts.

       

      Something like this:

       

      if ( event.fieldFull || event.willCommit )

      this.getField('Myboxname_cont').setFocus();

       

      But i know this is not right.

       

      Any help?

      Thanks in advance

        • 1. Re: Form field Continued on page 3
          MichaelN Level 3

          Where are you placing this script?

          • 2. Re: Form field Continued on page 3
            daxcastro Level 1

            In the javascripts area. I tried it in the validation and it didnt work either.

            • 3. Re: Form field Continued on page 3
              George_Johnson MVP & Adobe Community Professional

              This has been a common request over the years and I've never seen a satisfying implementation.

               

              Also, there are a number of field events for which you can add code (e.g., keystroke, format, validate, calculate, mouse enter, etc.) so "javascripts area" is not specific enough to be helpful.

              • 4. Re: Form field Continued on page 3
                daxcastro Level 1

                I am sorry. Let me be clearer. I click the "document Javascript" button from the right hand menu. I am using Acrobat XI. I figured it had to be there because the javascript needs to happen for the document overall and not just when they complete an action. I am all thumbs when it comes to JS. I am a front end guy and I can read a JS and know enough to make sense of it and understand what it is doing, but I fail as a coder when trying to do things on my own.

                 

                Thanks again for your help in advance.

                • 5. Re: Form field Continued on page 3
                  daxcastro Level 1

                  Okay.. thanks for making me think more about where I was putting what.. For those who are also looking for this solution here is what I came up with.

                   

                  1. Right click and choose "Properties" on form field you want them to start typing in.

                  2. Click the "Format" tab and change category to "Custom"

                  3. insert the code below but replace "goal1cont" with the field name of the new field you want the text to overflow into.

                   

                  if ( event.fieldFull || event.willCommit )

                  this.getField("goal1cont").setFocus();

                   

                   

                  4. Repeat as necessary for other fields on the page.

                  5. Save and done!

                   

                   

                  I figured it out! Yay Me!!! With a little help from the forums.

                  • 6. Re: Form field Continued on page 3
                    MarkWalsh Level 4

                    Be very aware that there are many problems with this approach, among them:

                     

                    This will break to the next field in the middle of a word, it won't wrap the way many people expect.

                     

                    Deleting characters in the first field won't rewrap the second field into the first.

                     

                    If you start editing words in the middle of the first field, it won't push the remaining characters to the next field, it will just jump to the next field when the field is full and continue, resulting in completely disjointed copy.


                    As George mentioned, there really isn't any acceptable method to do this.

                    • 7. Re: Form field Continued on page 3
                      daxcastro Level 1

                      You are right. It is not 100% but for internal distribution of a document, this works well enough. Too bad Adobe doesn't take a lesson from its own Indesign product about linking text boxes.

                      • 8. Re: Form field Continued on page 3
                        George_Johnson MVP & Adobe Community Professional

                        In addition to what Mark pointed out, using that code will result in at least one character being dropped when the focus gets set to the second field when the first is full.