• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Does anyone have a script to make text flow to a second field when first field is full (first field has an indent)

Community Beginner ,
Jun 15, 2017 Jun 15, 2017

Copy link to clipboard

Copied

Hi,

I am working on forms that have 2 or more lines to fill out, but the first line is indented. I would like to add a script to the custom field box to have the text continue into the next field when the first one is full. I see some old scripts online, but nothing that I can get to work, and I am not a script writer. I'm wondering if anyone has something that would work? Thanks! [Adobe Acrobat DC, forms]

TOPICS
PDF forms

Views

3.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jun 21, 2017 Jun 21, 2017

You'll notice that when you jump from one field to the next you lose a character.

I just found the right script, the previous one was actually not perfect.

Place this script as a doc-level script:

function autoTab(doc, event, cNext)

{

    if (event.rc && AFMergeChange(event).length == event.target.charLimit)

        {doc.getField(cNext).setFocus();}

}

And place this script as a custom keystroke script:

autoTab(this, event, "NextFieldName");

Beware that the "Limit of n characters" must be settled in each f

...

Votes

Translate

Translate
Community Expert ,
Jun 16, 2017 Jun 16, 2017

Copy link to clipboard

Copied

Not possible.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 16, 2017 Jun 16, 2017

Copy link to clipboard

Copied

Place this JavaScript as a keystroke format script in the first field:

if (event.fieldFull || event.willCommit) this.getField("NextTabField").setFocus();

Where "NextTabField" is the name of the 2th field.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 16, 2017 Jun 16, 2017

Copy link to clipboard

Copied

Thanks, but the script doesn't work for me.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 16, 2017 Jun 16, 2017

Copy link to clipboard

Copied

There appears to be no reliable code for this.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 17, 2017 Jun 17, 2017

Copy link to clipboard

Copied

Here is a sample file: [removed, see below for details]

Here is the documentation: http://help.adobe.com/livedocs/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/wwhelp/wwhimpl/common/html/wwhelp...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 21, 2017 Jun 21, 2017

Copy link to clipboard

Copied

Thank you, that works perfectly!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 21, 2017 Jun 21, 2017

Copy link to clipboard

Copied

Not really... You'll notice that when you jump from one field to the next you lose a character. Also, if you back-space and delete the characters in one field it won't go back to the previous one. And if you manually delete the contents of a field the cursor will not go back to it, unless you reset the whole form. These issues are why I wrote it can't be done in a PDF file.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 21, 2017 Jun 21, 2017

Copy link to clipboard

Copied

You're right. I didn't check any of that until now, and it's true I lost a character, can't backspace, etc. Thanks for pointing all of that out. I'm going back to the old method of just making a big box for people to type in instead of trying to use separate lines. Too bad.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 21, 2017 Jun 21, 2017

Copy link to clipboard

Copied

You'll notice that when you jump from one field to the next you lose a character.

I just found the right script, the previous one was actually not perfect.

Place this script as a doc-level script:

function autoTab(doc, event, cNext)

{

    if (event.rc && AFMergeChange(event).length == event.target.charLimit)

        {doc.getField(cNext).setFocus();}

}

And place this script as a custom keystroke script:

autoTab(this, event, "NextFieldName");

Beware that the "Limit of n characters" must be settled in each field.

Here is a new sample file that works fine: Fichiers partagés - Acrobat.com

Also check out these 2 topics where you can find more elaborated scripts made by… .

- Debenu's Planet PDF Forum - Discussion forum for Acrobat & PDF

- http://acrobatusers.com/forum/forms-acrobat/auto-tab

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 03, 2017 Jul 03, 2017

Copy link to clipboard

Copied

LATEST

It worked for me! Thank you! =D

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines