Skip to main content
Participant
June 11, 2018
Question

Is there a way to hide or collapse up the blank area when fields are hidden?

  • June 11, 2018
  • 2 replies
  • 350 views

I have a pdf form with some labels and texts on it. I have a javascript which shows/hides some fields when a checkbox is clicked. When some fieds are hidden, they create some blank space in the form. How can I collapse the section /move  rest of the fields up to get rid of thiose extra spaces? They should ceate those spaces again when the hidden fields show up.

Can some body help? I have using adobe acrobate reader 2017 on a windows 8 system.

This topic has been closed for replies.

2 replies

Inspiring
June 11, 2018

You have asked this in the old post How do you collapse a blank area of a pdf form?

There has been no further responses because it will be a lot of code and detailed explanations that. are far to much for this fourm.

As explained in the older post you will need to place all objects of the form in form fields and then use JavaScript to move those objects as needed using JavaScript an then setting the display property of the fields that need to be visible. See Automating placement of annotations for information about placing annotation objects using JavaScript. You can also do this with the form field object. At the bottom of the tutorial there is a link to the Acrobat JavaScript API Reference which will include the material needed to manipulate the field object using JavaScript. The JavaScript not covered in the Acrobat document is contained in the Mozilla JavaScript Reference..

Bernd Alheit
Community Expert
Community Expert
June 11, 2018

Not possible with Acrobat forms.