Highlighted

Detecting if a form is open on Mobile or Desktop

Enthusiast ,
Aug 17, 2020

Copy link to clipboard

Copied

I have a form that works perfectly on Desktop, but the submit button don’t works on mobile. I know it’s because I have a custom javascript inside that button and only a portion of javascript is supported on mobile device.

My question is: Is there a way to have something inside the PDF that can detect if the PDF is open on desktop versus mobile, and change the submit mecanism according to each?

Thanks!

Most Valuable Participant
Correct answer by try67 | Most Valuable Participant

Not likely. If a script can't work, then it also can't detect that it's not working... The workaround is to create a warning message that's always visible by default and then use a script to hide it (for example, by making a field that's placed on top of it hidden). If the script executes, the message is hidden when the file is opened. If it's not, the message remains visible.

Topics

PDF forms

Views

23

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Detecting if a form is open on Mobile or Desktop

Enthusiast ,
Aug 17, 2020

Copy link to clipboard

Copied

I have a form that works perfectly on Desktop, but the submit button don’t works on mobile. I know it’s because I have a custom javascript inside that button and only a portion of javascript is supported on mobile device.

My question is: Is there a way to have something inside the PDF that can detect if the PDF is open on desktop versus mobile, and change the submit mecanism according to each?

Thanks!

Most Valuable Participant
Correct answer by try67 | Most Valuable Participant

Not likely. If a script can't work, then it also can't detect that it's not working... The workaround is to create a warning message that's always visible by default and then use a script to hide it (for example, by making a field that's placed on top of it hidden). If the script executes, the message is hidden when the file is opened. If it's not, the message remains visible.

Topics

PDF forms

Views

24

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Most Valuable Participant ,
Aug 17, 2020

Copy link to clipboard

Copied

Not likely. If a script can't work, then it also can't detect that it's not working... The workaround is to create a warning message that's always visible by default and then use a script to hide it (for example, by making a field that's placed on top of it hidden). If the script executes, the message is hidden when the file is opened. If it's not, the message remains visible.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Enthusiast ,
Aug 18, 2020

Copy link to clipboard

Copied

Thanks!

I'll go with the workaround.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Adobe Community Professional ,
Aug 17, 2020

Copy link to clipboard

Copied

app.platform will give tell you the operating system.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Most Valuable Participant ,
Aug 17, 2020

Copy link to clipboard

Copied

I doubted it would work, but at least in Acrobat on an Android device it does return "Android" correctly...

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Resources
One Stop Solution for Acrobat
Edit a PDF