Anyone have an idea how I could do a rule to copy to the client clipboard?
I don't believe this is possible today. But it sounds like an excellent feature request.
I would suggest you submit product feedback for this, at the following link:
Thanks, and regards,
Copy to clipboard would be fun to do.
I would suspect you'd have to create a service that you could build a smartobject out of. I might give this one a shot:
Ok, I managed to get to the bottom of this as follows:
There is a limitation that you can only copy to clipboard when a user is generating an event on a webpage (e.g. double clicking a field) due to browser security restrictions. This is to stop webpages arbitrarily overwriting the clipboard which makes sense.
As long as this is what you want then you can do the following:
1) Change the fields ToolTip text to something unique. For example "Click to copy to clipboard"
2) Add a datalabel to the view and tick "Literal" and un-tick "Prevent XSS"
3) Create a rule with two data transfer actions and make sure you call the rule on "Initialize"
4) The first transfer should blank your data label
5) The second transfer should copy the following to the data label
When the user double clicks the field it will copy the text in the field to the clipboard.
This was to suite my requirements to be able to double click a text field in a list view and have it copied to the clipboard. If you want to use it in another way, say for instance when a user clicks a button then change the ".dblclick" to ".click" and add the ToolTip text to the button so it triggers when you press it. You'll also need to work out how to change the "this.text" to the information that you want to copy to the clipboard which might be more tricky but at least it's a strating point.
Already have an account? Login
No account yet? Create an account
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.