Copying contact information to the clipboard

  • 0
  • 1
  • Question
  • Updated 6 years ago
  • Answered
Sometimes my users want to include another contacts information in an email. In Sages ACT! software there was a button that when pressed would grab the basic info, copy it to the clipboard and you could paste the result in an email as follows:

Joe Bloggs
123 Fake St
Awesome City
CA, 12321

Can I create a button that does this in Quickbase?
Photo of Micheal

Micheal

  • 0 Points

Posted 6 years ago

  • 0
  • 1
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,434 Points 20k badge 2x thumb
You can use the image onload technique to embed ZeroClipboard into you form:

https://github.com/jonrohan/ZeroClipboard

ZeroClipboard and a little JavaScript can be configured to automatically snag some text off the form and place it into the clipboard. Browsers on their own are not allowed to access the clipboard as a security precautio to prevent a malicious script from grabbing content you may have on your clipboard and sending to to a remote server.
Photo of Micheal

Micheal

  • 0 Points
Sorry to bug you again, normally when I have a direction to I'm good. The thing I'm struggling with is how to use image onload? Anything I have read seems to say you need to save stuff to your website. It's a bit confusing.

Have you used ZeroClipboard before to do what I am looking for? If so could you tell me how you did it?
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,434 Points 20k badge 2x thumb
The image onload technique is a way to add a specially constructed field to a form for the sole purpose of allowing you to run your own script to modify the page behavior. The vast majority of the forum answers that use script use the image onload technique because you need to gain control of the page in order to modify the behavior. The image onload technique is described here:

https://www.quickbase.com/db/bgcwm2m4g?a=dr&rid=93

You can find additional info regarding ZeroClipboard with a google search including this jQuery plugin that uses ZeroClipboard

zclip jQuery Plugin
http://www.steamdev.com/zclip/