How to Fix PDF Form JavaScript Not Working on Mobile Devices
Question details
The user needs to enforce a conditionally required comments field when a specific radio button is selected in a PDF form on mobile devices.

- Product
- PDF Forms
- Device & OS
- iPhone, iPad, Android
- Scenario
- Filling out a digital inspection form with Pass/Fail radio buttons and conditional required comments on mobile devices.
- Observed behavior
- The JavaScript validation correctly requires comments on laptops but fails to enforce the conditional requirement on mobile PDF apps.
Keep in mind that mobile PDF readers generally have limited support for advanced desktop JavaScript API features. Verify if your workflow strictly requires a PDF format during data entry or if a web-based alternative is acceptable for mobile users.
Use a Web-Based Form for Reliable Mobile Data Collection
Since mobile PDF viewers lack robust JavaScript support, switching to a responsive web form ensures conditional logic works flawlessly across all mobile platforms.
Acrobat mobile applications and third-party mobile PDF readers do not support the full desktop PDF JavaScript API. As a result, radio-button validations and conditionally required fields often fail to trigger. Transitioning the data collection phase to a web application resolves these compatibility issues.
Select a web-based form builder such as Google Forms, Microsoft Forms, or a dedicated mobile inspection application.
Add your standard questions, including the 'Pass' and 'Fail' multiple-choice radio buttons.
Use the form builder's built-in logic settings to make the 'Comments' field required and visible only when the user selects 'Fail'.
After users submit their responses on mobile devices, use the form platform's export or print feature to save the completed responses as PDF files for your archives.

Manage and Fill PDF Forms Easily with WPS Office
While complex JavaScript may face compatibility limitations across mobile operating systems, WPS Office provides a robust, lightweight, and highly compatible PDF editor for viewing, filling, and managing standard PDF forms smoothly across all your devices.
- 1. Install WPS Office: Download and install the free WPS Office application on your preferred mobile device or computer.
- 2. Open your PDF form: Launch the WPS PDF tool and open your inspection or data collection form.
- 3. Enter your data: Tap on the interactive text fields, checkboxes, and radio buttons to effortlessly fill out the document.
- 4. Save and share: Save the filled form and share it directly with your team via email or cloud storage.

Frequently Asked Questions
Why does JavaScript work on desktop PDFs but not on mobile apps?
Most mobile PDF viewer apps restrict or omit full support for the Adobe JavaScript API due to mobile OS limitations, security restrictions, and performance optimizations. This causes advanced scripts, like conditional validations, to be ignored.
Can I force a PDF field to be required on mobile without using JavaScript?
You can set a field as universally 'Required' in the field properties during form creation. However, making a field conditionally required (e.g., only required if 'Fail' is checked) strictly relies on JavaScript and will generally not work natively on mobile.
What are the best alternatives to PDF forms for mobile devices?
Web-based form builders like Google Forms, Microsoft Forms, or Jotform are highly recommended for mobile use. They handle conditional logic natively in the web browser, ensuring it works perfectly on iPhone, iPad, and Android without specialized apps.




