Skip to main content
Participating Frequently
September 26, 2025
Question

Acrobat form help - Toggle switches as in IOS, possible?

  • September 26, 2025
  • 2 replies
  • 138 views

On an Acrobat form, is it possible to create a toggle switch that looks (and behaves) like toggle switches in IOS?

 

I tried created a button with an icon, but how do I change the "state" appearance according to the action?

 

Trying to replace radio button groups with this option due to lack of space...

 

 

Thank you!

2 replies

Thom Parker
Community Expert
Community Expert
September 26, 2025

This is possible if PDF is opened in a PDF viewer the supports the JavaScript for changing button icons. 

I don't think there is one for IOS. You'll need to test it out. 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
try67
Community Expert
Community Expert
September 26, 2025

I don't think they meant they want it to work in iOS, but like it does in iOS (in other applications).

Thom Parker
Community Expert
Community Expert
September 26, 2025

Of course, details.  

So then, I think they need to know that the appearance of radio buttons and checkboxes cannot the reliably changed (but it can be done). Hence, your image carousel solution, which uses scripts to turn a push button into a 2-state button.

 

I've done this sort of thing many times, and the one thing I don't  like about it is that it only works in Acrobat and the few other compliant viewers.  I also don't like that the state data is not the value of the field being used.  It is annoying that the list of checkbox appearances is limited. 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
PDF Automation Station
Community Expert
Community Expert
September 26, 2025

You can use buttonSetIcon() method in a mouse up action to change the icon.

https://pdfautomationstation.substack.com/p/how-to-build-a-pdf-button-image-carousel