How to Hide Acrobat Form Fields Without Leaving Blank Space
Question details
The user needs to hide unused form fields in a travel form dynamically, based on the number of employees selected, without leaving empty gaps on the page.

- Product
- Adobe Acrobat Pro DC
- Device & OS
- not provided
- Scenario
- Creating an interactive travel form that accommodates a variable number of employees.
- Observed behavior
- When unused form fields are hidden in a standard PDF, the layout does not automatically reflow, leaving obvious blank spaces where the fields used to be.
Understand that standard PDF forms (AcroForms) have a fixed, static layout by default. Achieving a dynamic layout where content shifts up automatically requires specialized document design techniques or enterprise software.
Use a Dynamic Layout Approach with Flowed Subforms
Use Adobe Experience Manager (AEM) Forms or LiveCycle to create an XFA form, which natively supports dynamic reflowing of elements.
Standard Acrobat Pro DC cannot create naturally reflowing documents. To make empty spaces collapse automatically, the document must be built as a dynamic XML form (XFA form).
This requires Adobe Experience Manager Forms Designer (formerly LiveCycle Designer), which is designed specifically for complex, dynamic document layouts.
Launch Adobe Experience Manager Forms Designer and create a new blank form.
Wrap your employee-specific form fields and their corresponding text into 'Subforms'.
Select the parent Subform wrapping your sections, go to the Object palette, and change the 'Content' setting from 'Positioned' to 'Flowed'.
Use FormCalc or JavaScript on the selection dropdown to change the unused employee Subforms' presence property to 'Hidden'. The Flowed layout will automatically collapse the blank space.

Design the Entire Page Using Form Fields and Coordinate Scripts
Convert all surrounding text into read-only form fields and use JavaScript to manually shift their coordinates when a section is hidden.
Easily Create and Manage Standard PDF Forms in WPS Office
While dynamic reflowing forms require complex enterprise tools, standard PDF forms remain the best choice for reliable, cross-platform compatibility. WPS Office features a comprehensive PDF editor that lets you effortlessly design, fill, and manage interactive forms without writing complex scripts.
- 1. Open Document in WPS PDF: Launch WPS Office, select the PDF module, and open your existing document or travel form.
- 2. Access Form Controls: Navigate to the 'Form' tab on the top ribbon to view all available interactive form elements.
- 3. Insert Form Fields: Click on 'Text Field', 'Check Box', or 'Combo Box', then click and drag on the page to place the field precisely.
- 4. Configure Properties: Double-click the inserted field to open its properties, where you can set the field name, appearance, and default values.
- 5. Save and Share: Save your document. The resulting standard PDF form can be smoothly filled out by employees on any device.

Frequently Asked Questions
Why does hiding a form field in Acrobat leave a blank space?
Standard PDF files (AcroForms) use a fixed-coordinate system. Every element is drawn at a specific location on the page. Hiding a field makes it invisible but does not instruct the surrounding static text or elements to automatically move up and fill the gap.
How do I hide a form field using JavaScript in a standard PDF?
You can hide a form field by attaching a JavaScript action to an event (like a button click or dropdown selection). The command to hide a field named 'Employee2' is: this.getField('Employee2').display = display.hidden;
What is the difference between an AcroForm and an XFA form?
An AcroForm is the standard PDF form type with static layout and broad compatibility across browsers and PDF readers. An XFA (XML Forms Architecture) form relies on dynamic XML structures that allow elements to reflow or grow automatically, but requires specialized Adobe software to create and view.




