BrightLeaf Digital Code Snippet Library
Check out our growing library of code snippets for Gravity Forms!
Eleven of these snippets register their own shortcodes. Every tag and attribute is in our Gravity Forms shortcodes reference. Need a Gravity Forms or GravityView shortcode built for you? Try the free shortcode builder.
Shortcode to display and copy text
Goal
This snippet creates a shortcode that displays the configured text along with a copy button to easily display copyable content on your site.
Usage
[bl_copy]Some text to copy[/bl_copy][bl_copy label="API Key"]sk_live_123...[/bl_copy][bl_copy tag="span"]Text[/bl_copy]
Attributes
- label: small label shown above the value
- tag: wrapper tag for the value (div|span|code), default: div
Install Using Code Snippets
This code is best installed directly on your site using the Code Snippets plugin.
Check Out the Code
Loading...
Stay Updated On This Snippet
Review this entry
You must be logged in to post a comment.