Skip to main content
Participating Frequently
July 6, 2019
Answered

JavaScript code to embed a vcard in a button (Action: on click > save contact) should work on android or IOS

  • July 6, 2019
  • 2 replies
  • 3240 views

can any help me please,
I do have a PDF form with a phone number in it and my client wants the phone number to be clickable and to pop-up a (vcard)

to "save contact"
I have found a way to open the phone number -by clicking on it-  shows on the caller dialing screen to make a call but it is not enough, I need it to open save as contact with all contact details (number, name, address, mail ....etc)
Thanks a lot

This topic has been closed for replies.
Correct answer JoelGeraci

You'll need to post the vcard to a public URL and then create a link to it from the button. It needs to be a regular PDF link, not a scripted link. The PDF will execute the link and then the OS takes over and handles the vcard file type.

2 replies

JoelGeraci
JoelGeraciCorrect answer
Participating Frequently
July 6, 2019

You'll need to post the vcard to a public URL and then create a link to it from the button. It needs to be a regular PDF link, not a scripted link. The PDF will execute the link and then the OS takes over and handles the vcard file type.

try67
Community Expert
Community Expert
July 6, 2019

Even it if was possible with a script, it's highly unlikely to work on mobile devices, at all.

Participating Frequently
July 6, 2019

would you explain it more?

try67
Community Expert
Community Expert
July 6, 2019

The support for JavaScript in PDF applications on mobile devices ranges from non-existent to very limited, especially when it comes to things like opening external files or otherwise interacting with the operating system.