Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


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

544

Likes

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

Adobe Community Professional , 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];

Likes

Translate

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

Likes

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! 

Likes

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