Reorder Text-Field Statements in an Adobe Acrobat PDF Form
Question details
Allow users to arrange 21 statements in a fillable PDF form according to their priorities.

- Product
- Adobe Acrobat PDF forms
- Device & OS
- not provided
- Scenario
- A form designer wants users to rank or reorder statements using controls such as buttons or dropdown menus.
- Observed behavior
- Users need a way to indicate their preferred order without the form designer physically moving fields for each response.
Open the PDF in Adobe Acrobat and choose Prepare a form to check the names of the 21 text fields. Decide whether users should change the displayed statement order or assign a rank beside each statement.
Swap Adjacent Statement Values with Acrobat Form Buttons
Use buttons when users need to change the displayed order of statements while the fields remain in place.
Acrobat JavaScript can exchange field values rather than physically rearranging the form fields. Repeated swaps let a user move a statement through the list.
In Acrobat, open the PDF and select Prepare a form. Note the names of two adjacent statement fields, such as Statement1 and Statement2.
Use the Button tool in Prepare a form to place a button near the two fields. Give it a recognizable label, such as Swap 1 and 2.
Open the button's Properties, select Actions, choose Mouse Up and Run a JavaScript, and add: var a = this.getField("Statement1"); var b = this.getField("Statement2"); if (a && b) { var temp = a.value; a.value = b.value; b.value = temp; } Replace the example names with the exact names of your fields.
Add equivalent buttons for the other adjacent field pairs, changing the field names in each script. Preview the form and click the buttons to verify that the statement values swap as intended.

Assign Priority Ranks with Dropdown Menus
Use dropdowns when users only need to rank statements rather than change their displayed order.
View and Annotate PDF Forms with WPS Office
WPS Office is a free, lightweight alternative for everyday document and PDF work. Its familiar interface and Microsoft Office format support make it easy to move existing files into your workflow. Use Acrobat or another suitable form tool for the JavaScript-based ranking interaction described above.

Frequently Asked Questions
Does the swap script move the actual form fields?
No. The button exchanges the values of two named fields; the fields themselves stay in their original positions.
Can users move a statement more than one position?
Yes. Provide a swap button for each adjacent pair and have users click successive buttons to move a statement through the list.
How can I prevent users from choosing the same priority twice?
Ordinary dropdowns do not enforce unique selections. Add validation to check the selected ranks, or use a separate ranking interface that enforces unique choices.
Will the buttons work in every PDF viewer?
Not necessarily. PDF viewers differ in their support for Acrobat JavaScript, so open the saved form in the intended viewer and test its buttons before distributing it.




