How do I call a lightbox script with the [button] shortcode?

I’m using this form product called Paperform, which now supports popup button embeds…

To embed my form, their code is the following:

<button data-paperform-id="free5contentideas" data-popup-button="1">Click me to show the form!</button><script>(function() { var script = document.createElement('script'); script.src = "https://paperform.co/__embed";document.body.appendChild(script); })()</script>

Now, they say I can use these attributes to create a popup button out of any element:

Unfortunately, there’s no luck if I switch up the code from into [button]. Clicking the X Shortcode-powered button only sends me to the /# of the page, not running the script.

My question:
How do I use the [button] shortcode to call this popup script?

Hi There,

Regretfully you can not add a custom attribute to the shortcode. Use the given button code instead and add a class x-btn on it so it will look like an x button.

e.g.

<button class="x-btn" data-paperform-id="free5contentideas" data-popup-button="1">Click me to show the form!</button>

Thanks,

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.