onClick attributes in settings for buttons, links etc.

Would be nice to have a simple way to add onClick functionality to buttons, links etc for tracking or functionality/methods to toggle other custom elements while still being able to style these things cohesively with the rest of our projects if we are using animations etc. 

I'm not super code savy so sorry if I am not conveying this correctly haha but hopefully you understand what I mean. I am aware this use be easy to do with custom attributes in the settings panel but was eventually disabled a while back. 

I hope Webflow and the community will vote this up to bring back a simple way to add custom attributes for onClick methods/calls (not sure what the terminology is here). 

  • Noah Raskin
  • Sep 28 2018
  • Reviewed
  • Chandler Hartigan commented
    31 Oct 19:41

    Would be great to have the ability to do this. Reviewed in 2018, now almost 2026. Yes, that forum answer can work but this should be something we can do natively. We shouldnt need extra lines of js to assign an onClick function to an element. Its one of the most elementary js events, it should be readily available for use

  • Mike Mack commented
    May 11, 2020 23:15

    I'm just adding this link here because this wishlist item seems to be answered. It works great for me:
    https://forum.webflow.com/t/add-onclick-attribute-to-any-element-with-this-js-snippet/23730

  • Noah Raskin commented
    October 08, 2018 19:03

    Way cool! 😁

  • Admin
    Webflow Team commented
    October 08, 2018 18:59

    Thanks for the suggestion. I have added this to our backlog.

    - Nelson, Customer Success Specialist

  • +8