How to Set Up a Click to Copy Element

Digioh App Marketplace

Sometimes you want a user to be able to copy some text to their clipboard, for example a coupon code.

With Digioh, you can set up a Click to Copy button so a user can copy some text. This can be done with an app called “Click to Copy Button”.

To start, simply install the app in Digioh through the Apps page found under Admin, Custom Javascript (Apps).

To set an element as the text to be copied, in the elements settings, add the text that should be copied into the ‘Text’ section:

For example, this could be a coupon code, or a dynamic coupon merge tag like [COUPON_123]. See here for more information on dynamic coupons.

Next, set the element’s metadata with key ‘text_copy_val’ with value ‘true’, as seen below:

Finally, navigate to the element the user will click to copy the text.  (This may or may not be the same element the text is copied from.) Add metadata to the element with key ‘text_copy_action’ and value ‘true’ as seen below:

 

Questions? Comments? Let us know at contact@digioh.com