How to Create a Dynamic PDF Form with Conditional Sections in Acrobat
Question details
The user wants to configure a PDF form to dynamically show or hide specific sections based on checkbox selections without relying on Adobe LiveCycle or InDesign.

- Product
- Adobe Acrobat XI
- Device & OS
- not provided
- Scenario
- Designing an interactive form where the layout and available fields adjust automatically depending on user input.
- Observed behavior
- Acrobat does not natively support fully dynamic, reflowing form generation, requiring extensive JavaScript to manage hidden templates and element repositioning, which is further limited by Adobe Reader.
Before attempting to build dynamic forms directly in Acrobat, be prepared to write and troubleshoot extensive custom JavaScript, as Acrobat does not natively support automatic text and field reflowing.
Use JavaScript and Hidden Templates
Implement a scripting workaround to simulate a dynamic form by placing conditional sections on hidden templates and toggling their visibility with checkbox actions.
Because Acrobat XI lacks native dynamic forms like those built in Adobe LiveCycle, you must manually script the behavior to show/hide sections and recalculate field positions. This is highly complex and requires advanced JavaScript proficiency.
Design the individual conditional sections on separate pages within your PDF. Use the 'Page Thumbnails' panel to set these pages as hidden templates.
Navigate to the 'Tools' pane, select 'Forms', and click 'Edit'. Add the necessary checkboxes that will act as the triggers for showing or hiding content.
Right-click a checkbox, choose 'Properties', and go to the 'Actions' tab. Select 'Run a JavaScript' under 'Select Action' and click 'Add'. Write a script that checks the 'Mouse Up' event to spawn (or hide) the corresponding hidden template based on the checkbox state.
Write additional JavaScript logic to obtain the coordinates of all fields below the newly spawned section. Recalculate their Y-axis positions to shift them down as the content expands, or trigger page-creation scripts if the elements overflow the page boundaries.

Use Adobe LiveCycle Designer or Dedicated Dynamic Form Tools
Transition your form design to a purpose-built dynamic XML form editor to handle reflowing layouts natively without excessive scripting.
Build Interactive PDF Forms with WPS Office
While heavily scripted, dynamically reflowing PDFs are prone to breaking across different viewers, standard interactive forms are widely supported. WPS PDF provides a lightweight, intuitive interface to seamlessly build professional fillable forms without writing complex code.
- 1. Open your document in WPS PDF: Launch WPS Office, open your target PDF file, and navigate to the 'Form' tab on the top ribbon.
- 2. Insert form controls: Select the desired interactive controls, such as 'Check Box', 'Text Field', or 'Combo Box', and click anywhere on the document to place them.
- 3. Configure field properties: Double-click the inserted form field to open the Properties dialog. Here you can set default values, appearance details, and field names to ensure proper data collection.
- 4. Export and distribute: Save your PDF document. The interactive form is now ready to be securely shared and reliably filled out by users on any standard PDF viewer.

Frequently Asked Questions
Can Adobe Reader process dynamic form deletion logic?
No. While Acrobat Pro can execute complex JavaScript to hide and delete spawned pages, free Adobe Reader applications restrict page deletion. Attempting to delete dynamic sections via Javascript in Reader will typically yield security errors or fail silently.
Do I need LiveCycle to create conditional PDF forms?
Technically no, you can simulate conditional visibility using hidden templates and JavaScript in Acrobat XI. However, LiveCycle Designer uses XFA architecture specifically built to natively handle flowing text and dynamically expanding sections without code hacks.
How do I hide a simple form field based on a checkbox in Acrobat?
You can show or hide individual fields without moving content by adding a custom JavaScript action to the checkbox's 'Mouse Up' event. Use the script: this.getField('FieldName').display = display.hidden; (change to display.visible to show it again).
Will dynamic PDF forms function correctly on mobile devices?
Extensive JavaScript workarounds and dynamic reflowing features commonly fail on mobile PDF viewers. Most mobile apps only support filling standard AcroForms, so complex conditional logic should be avoided if targeting mobile users.




