Skip to main content
Participating Frequently
Jul 6, 2019 6:17 PM UTC
Answered

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

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 is closed to new replies. Start a new post to keep the conversation going.
JoelGeraci
JoelGeraciCorrect answer
Participating Frequently
Jul 6, 2019 9:50 PM UTC

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.

5 replies

JoelGeraci
JoelGeraciCorrect answer
Participating Frequently
Jul 6, 2019 9:50 PM UTC

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.

Translate
try67
Community Expert
Community Expert
Jul 6, 2019 6:24 PM UTC

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

Translate
Participating Frequently
Jul 6, 2019 6:33 PM UTC

would you explain it more?

Translate
try67
Community Expert
Community Expert
Jul 6, 2019 8:19 PM UTC

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.

Translate