Skip to main content
Participant
December 1, 2017
Question

Text box linking

  • December 1, 2017
  • 1 reply
  • 498 views

So I am trying to create a form that the text boxes link together, and so far ive run into a problem


I am using this script

var t1=this.getField ("Name of First Text Box");
if (event.fieldFull)
{getField("Name of Second Text Box").setFocus();}

And while it allows me to link them forward I can not backspace into the first field.

Is there anything I can do to make them backspace into the first field once in the second?

I am very new to java and i found this script so any help would be greatly apreciated.

This topic has been closed for replies.

1 reply

Joel Geraci
Community Expert
Community Expert
December 1, 2017

I've been trying to figure this out for over 10 years. Give up. It'll never work the way users will expect it to. You  can't select across the field break, backspace stops at the start of the second field etc.

Instead, create an input dialog that captures all of the text at once and then do something reasonable to break it up across the fields.

Thom Parker
Community Expert
Community Expert
December 1, 2017

I too have tried to figure this.  The fact is that there are not enough events and event properties so implement it properly.

Joel has it right. Use a popup response box, custom dialog, or just a big scrolling field to capture the text and then split it up.

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often