This came up while working on #5791.
It would be very useful for both core as well as contrib to be able to easily add click-to-copy buttons to things like text fields, text areas, and perhaps also error messages and watchdog entries.
Although it is generally considered relatively easy for people to be able to copy/paste, that might not always be the case. Quoting from https://github.com/backdrop/backdrop-issues/issues/5791#issuecomment-157...
Click > copy > paste is good enough I think.
...I agree ...however, it's more like: click > drag-select > may need to scroll depending on screen real estate > copy > paste ...or: right-click > select all (assuming that a) the browser supports it, and b) the person is using a pointing device that would allow them to right-click or that they know that hold-to-select is a thing) > copy > paste ...or good-old CTRL+A > CTRL+C > CTRL+P ...but all that assumes certain tech knowledge/affinity. As a person that is all about UX, and less clicks, less scrolling, less fiddling, having links to copy to clipboard or to download as .txt in a single click seem very appealing.
Recent comments
Thanks Alejandro. That was the clues I needed.
Ubercart - Programmatically add product to cart and straight to Checkout
Have you tried uc_cart_add_item()? You need to provide the nid of the product. Then you can use backdrop_goto('cart/checkout'); to send the user to the checkout screen. uc_cart_add_item...
Ubercart - Programmatically add product to cart and straight to Checkout
No problem, let's see how it evolves. I'd be happy to provide a suggested version if i could. I will keep that in mind and try learn this hook chain hopefully very soon. I will...
File hashing uploads made through TinyMCE