Add custom code to button

Hi Guys! I have a form embeded in a popup that I need to show when a button is clicked. In the code, there’s a standard button that I manage to customise however the styling takes a lot of time and is not the same as the buttons I’d like to use. So I was wondering if there’s a way to add a class or even directly insert the code to a button? As there are several buttons, it would be great to know.

Here’s the code for the popup:

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

Here is my site Read-Only: Webflow - Investor Rating

Hi Ivana, I don’t have time to dig into your project design but from the bit of code you’ve given it looks like you’re using some type of JS-based popup library. I’d start with those docs to see what triggers it supports.

You may be able to just create a button and attach the lib’s custom attributes, or you might need to call some JS initializer to bind it.

But typically yes there’s a way to make a button that will trigger events on your page even if it’s done by JS-clicking another hidden button in your page.