contao-bootstrap / buttons

Bootstrap 3 Contao 3 Buttons Component
GNU Lesser General Public License v3.0
0 stars 0 forks source link

allow onClick for buttons #3

Closed reluem closed 7 years ago

reluem commented 7 years ago

at the moment one can enter several html tags such as "class": "btn-lg". For google analytics tracking, it would be nice if you could also add onClick events. Unfortunately, the entered strings seem to be converted to unicode, and a simple ( becomes (, thus breaking the Google tracking.

onClick should look like this: onClick="gaTrackEvent('E-Mail sent', 'foo@bar.com');"

Is there any way to change this?

dmolineus commented 7 years ago

I recommend to use a custom template for it. Do you need it for the button or buttons element?

reluem commented 7 years ago

hi @dmolineus, sorry for not answering! I would need it for the button element, but rather a generic solution than 'hacking' individual templates.