Skip to main content
KrankyMarx
Participant
January 29, 2019
Question

I need to Create a dynamic form

  • January 29, 2019
  • 2 replies
  • 1230 views

I need to Create a dynamic form where a section is populated or hidden based on check boxes, I do not have access to LifeCycle or InDesign and it needs to be a PDF for. I have searched extensively but cannot find help. Due to my organisation I only have Acrobat XI.

Example

I have 20 possible departments in my organisation, when the form is filled in the user must select the relevant departments.

Aim

When the departments are selected a sign off section is created/shown. I can do Show/Hide with JavaScript but this leaves horrible whitespace.

Can anyone help this is killing me!

This topic has been closed for replies.

2 replies

Participant
January 7, 2020

Hi KrankyMarx, Did you have any progress in this issue. I'm trying to do almost the same thing. I ended up with some progress but it's half way and for complex pdfs will be headache.

 

What I did is for each section (to show/hide) I created a Template and added these templates into base pdf file in hidden mode. Then based on the selected checkbox, I hide/show templates. 

The headache part is (as you mentioned) when show/hide templates (sections) I need to calculate the top margin of the the elements (like textboxes, checkboxes, buttons, ...) below that section and move them down or up. (knowing what is the height of each template).

if the top margin is more than height of a page, I create a new page and put them in the new page. This is quite lots of lines of javascript but it works in Acrobat Pro veriosn.

 

However, frustratedly, in Adobe Reader deleting a page is not permitted so it doesn't work properly when user de-selects all checkboxes. (cannot delete extra page)

 

I feel this is not a right way of doing this but couldn't find any other way so far. I would consider LifeCycle which I don't khow too much about it.

 

If you have any advice, please update here.

Bernd Alheit
Community Expert
Community Expert
January 29, 2019

Adobe Acrobat can't create dynamic forms.