I would like to share my solution how to copy text from repeating groups to clipboard.
Add this script into page header section
<script>
function copyToClipboard(element) {
var $temp = $("<input>");
$("body").append($temp);
$temp.val($(element).text()).select();
document.execCommand("copy");
$temp.remove();
}
</script>
Create repeating group and add HTML element in to cell
Comment: I’ve added p infront of Current cell’s index just in case if I’ll have several fields to copy. Add whatever dynamic text you wish.
Create another HTML element in first cell
You can even make first HTML element hidden.
I hope someone will find this tip helpful.
10 Likes
This is cool! Thank you @petrucho
petter
March 22, 2017, 8:39am
3
Great tip, thanks for sharing!
NigelG
April 25, 2017, 7:47am
4
petrucho:
<script>
</script>
at the end saves you some grief
I have created an example on buildingonbubble if anyone needs it. This adds the css styling for the button too.
https://buildingonbubble.com/block/copy-to-clipboard-1493386877718x846040262164348900
1 Like
@NigelG thank you very much… I’m not sure if it’s my browser but…
NigelG
April 28, 2017, 2:10pm
6
Thanks, yes the HTML breaks the page it seems
Pardon me. There was a typo in original message.
Now it’s fixed.
Typo or not, it was a great suggestion so thank you
This is great stuff. One question though: I’m using a multiline input and on copy it eliminates spaces and enters. Can it also copy that info so paragraphs are preserved?