Skip to main content
emmamurdock
Participant
July 19, 2023
Question

Change Text Field position on checkbox click in fillable form

  • July 19, 2023
  • 1 reply
  • 424 views

Hi, I'm new to Adobe Fillable Form and want to change the position of a text field based on whether or not a checkbox is clicked. I have looked for similar solutions to solimar problems but cannot find any. I'm assuming javascript would be the easiest way to do this, but I don't know how to go about it. Does anyone know how to do this?

This topic has been closed for replies.

1 reply

Thom Parker
Community Expert
Community Expert
July 19, 2023

Yes, JavaScript is the only solution. And it will only work on Acrobat and Reader. Other PDF viewers do not support the level of scripting needed to dynamically move fields. The field "rect" property controls the position of the field.

https://opensource.adobe.com/dc-acrobat-sdk-docs/library/jsapiref/JS_API_AcroJS.html#id602

 

Change it to move the field.

 

Read this:

https://www.pdfscripting.com/public/PDF-Page-Coordinates.cfm

You'll find a download file that demonstrates moving fields dynamically here (called "Swat the Fly"):

https://www.pdfscripting.com/public/Free-Sample-PDF-Files-with-scripts.cfm

 

 

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