DanaHauser
6 years agoQrew Cadet
Working Copy to Clipboard Button
I've created a button to copy the content of a field to the clipboard that I thought would be useful to others.
It copies the content of the field and then shows an alert that confirms what was copied.
I've tested it with Chrome and Firefox which works, Edge did not.
I used a Vibrant button, which allows me to put it into a Rich Text field with other buttons, instead of a Formula URL field. It will work with the URL field as well if you remove the button code.
Hope this helps.
Dana
It copies the content of the field and then shows an alert that confirms what was copied.
I've tested it with Chrome and Firefox which works, Edge did not.
I used a Vibrant button, which allows me to put it into a Rich Text field with other buttons, instead of a Formula URL field. It will work with the URL field as well if you remove the button code.
Hope this helps.
Dana
var text CB= URLEncode([Some Field]);
var text Alert= URLEncode([Some Field] & " Was Copied to the Clipboard");
"<a class='Vibrant Success' style=\"border:0px solid green; background-color:green; text-align: center;\"href=" &
"javascript:{" & "navigator.clipboard.writeText('" & $CB & "').then(function(){" & "},function(){" & "});" & "alert('" & $Alert & "');" & "};" & ">Copy to the Clipboard</a>"