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

Changing position of form fields with Javascript

New Here ,
May 10, 2021 May 10, 2021

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
3.6K
Translate
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
1 ACCEPTED SOLUTION
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];

View solution in original post

Translate
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 ,
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];

Translate
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
LATEST

This has worked, thank you! 

Translate
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