Forum Discussion

CurtisMiddleton's avatar
CurtisMiddleton
Qrew Trainee
5 years ago
Solved

Copy & Paste Button For A Field

Hi,

Is it possible to create a button that would go next to a field, that when clicked, it would copy the value in that field to your clipboard?

Regards,

------------------------------
Curtis Middleton
------------------------------
  • I have no idea if these work  and I can't help you if they don't.  There may very well be Browser security setting limitations of websites accessing your PC.

    But here are links to two previous posts on this topic.

    https://community.quickbase.com/quickbase/topics/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.

    Glad to hear! I forgot to apply css, if you see the snippet below -- this will look EXACTLY like a native alert now :)

    var text CB= URLEncode([Activity Details]);
    var text Alert= URLEncode("Activity Details" & " were 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(){" &
    "});" &
    "$.jGrowl('" & $Alert & "',{theme:'jGrowl-green'});" &
    "};" &
    ">Copy to the Clipboard</a>"
    VIEW COMMENT

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    https://community.quickbase.com/communities/community-home/digestviewer/viewthread?MessageKey=7417baf0-de10-4c58-ac8d-04af4a5308f7&CommunityKey=d860b0f8-6a48-487b-b346-44c47a19a804&tab=digestviewer

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    markshnier2@gmail.com
    ------------------------------

1 Reply

  • I have no idea if these work  and I can't help you if they don't.  There may very well be Browser security setting limitations of websites accessing your PC.

    But here are links to two previous posts on this topic.

    https://community.quickbase.com/quickbase/topics/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.

    Glad to hear! I forgot to apply css, if you see the snippet below -- this will look EXACTLY like a native alert now :)

    var text CB= URLEncode([Activity Details]);
    var text Alert= URLEncode("Activity Details" & " were 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(){" &
    "});" &
    "$.jGrowl('" & $Alert & "',{theme:'jGrowl-green'});" &
    "};" &
    ">Copy to the Clipboard</a>"
    VIEW COMMENT

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    https://community.quickbase.com/communities/community-home/digestviewer/viewthread?MessageKey=7417baf0-de10-4c58-ac8d-04af4a5308f7&CommunityKey=d860b0f8-6a48-487b-b346-44c47a19a804&tab=digestviewer

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    markshnier2@gmail.com
    ------------------------------