Skip to main content
Participating Frequently
September 19, 2025
Question

Confirmation to reset form Android or iPhone

  • September 19, 2025
  • 2 replies
  • 322 views

I am trying to use a JavaScript to create a dialog box asking if a user wishes to reset a form. I have the following script in use:

 

if(app.alert("Are you sure you want to clear this form?", 2, 2) == 4) { this.resetForm(); }

 

but on android or iPhone this only gives an option to tap OK which does not clear the form when you tap it. I have tried different variations of this script I have seen here and around the web. They all work properly on PC. One even adds another option on PC so I see Yes, No and Cancel, but they all don't work properly on mobile, i only get the box saying "Are you Sure you want to clear this form?" But the only tappable option is "OK" which does nothing. 

im hoping someone can help me adjust the script or has a solution to make a dialog box work with the option to say yes or no

2 replies

JR Boulay
Community Expert
Community Expert
September 22, 2025

[MOVED TO THE ACROBAT READER MOBILE DISCUSSIONS]

Acrobate du PDF, InDesigner et Photoshopographe
Amal.
Community Manager
Community Manager
September 23, 2025

 

Hi there,

Hope you are doing well and thank you for taking the time to share your detailed feedback. I understand how frustrating it must be to experience crashes on Android while the same workflow behaves differently on iPhone. 

 

At this point, I recommend updating your Android app to the latest version from the Play Store, as stability improvements are often quietly rolled out in updates. If the issue persists after updating, you may want to continue using the iOS version for critical form work until the Android app is more stable.

 

I know it’s not ideal, but your feedback is very valuable, and I encourage you to also post it in the Adobe UserVoice/Feature Request forums so the product team can track both the crash issue and your suggestion for a confirmation (“are you sure?”) dialog before clearing forms.

 

~Amal

AnandSri
Community Manager
Community Manager
September 19, 2025

Hello @Robert26497435gxu8

 

I hope you are doing well, and thank you for reaching out.

 

The Acrobat Reader mobile app has limited JavaScript support for mobile devices like Android or iPhone. It only shows a basic alert dialog with a single OK button and does not support conditional logic based on button responses.

 

You can use the Acrobat Wish form to raise a feature request with the product team. 

 

Thanks,

Anand Sri.

Participating Frequently
September 22, 2025

Ok. Makes sense. Is there a way to make tapping the OK button actually clear the form however? 

AnandSri
Community Manager
Community Manager
September 22, 2025

Hello @Robert26497435gxu8

 

Thank you for reaching out.

 

The scripts will and may work fine on the desktop app; however, due to the limitations on the mobile device, they will not work as the app does not fully support JavaScript alert dialog return values.

 

There isn't much that can be done with the current custom workflow. You may try the following suggestions, but this may or may not work, and you might have to customize it as per the requirement: 

 

app.alert("This will clear the form. Tap OK to proceed.");
this.resetForm();

 

This may remove the conditional check and directly reset the form after the alert. While it doesn't offer a "Yes/No" choice, it may clear the form data is cleared on mobile devices.

 

Thanks,

Anand Sri.