• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Detecting if a form is open on Mobile or Desktop

Community Expert ,
Aug 17, 2020 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!

TOPICS
PDF forms

Views

365

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
community guidelines

correct answers 1 Correct answer

Community Expert , Aug 17, 2020 Aug 17, 2020

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.

Votes

Translate

Translate
Community Expert ,
Aug 17, 2020 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.

Votes

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
community guidelines
Community Expert ,
Aug 18, 2020 Aug 18, 2020

Copy link to clipboard

Copied

LATEST

Thanks!

I'll go with the workaround.

Votes

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
community guidelines
Community Expert ,
Aug 17, 2020 Aug 17, 2020

Copy link to clipboard

Copied

app.platform will give tell you the operating system.

Votes

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
community guidelines
Community Expert ,
Aug 17, 2020 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...

Votes

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
community guidelines