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

Changing position of form fields with Javascript

New Here ,
May 10, 2021 May 10, 2021

Copy link to clipboard

Copied

Hello, 

I have several fields and buttons of my PDF form as described here: 

https://community.adobe.com/t5/acrobat/creating-a-form-field-that-doesn-t-clear-when-user-clicks-int...

Since each button has a fixed position on the form, is it possible to run a script inside a button which enables some other buttons or fields to jump to a different position within the form when you press the button? For example the position of my button or field is [400, 442, 412, 430] and I want it to appear on [400, 427, 412, 415] instead by pressing another button. 

 

Many thanks in advance!

 

 

TOPICS
How to , JavaScript , PDF forms

Views

2.7K

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 , May 10, 2021 May 10, 2021

You can change the position of a field by setting its rect property.

For example:

this.getField("Text1").rect = [400, 427, 412, 415];

Votes

Translate

Translate
Community Expert ,
May 10, 2021 May 10, 2021

Copy link to clipboard

Copied

You can change the position of a field by setting its rect property.

For example:

this.getField("Text1").rect = [400, 427, 412, 415];

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 ,
May 10, 2021 May 10, 2021

Copy link to clipboard

Copied

LATEST

This has worked, thank you! 

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